I hereby claim:
- I am cerdman on github.
- I am cerdman (https://keybase.io/cerdman) on keybase.
- I have a public key ASAcUp6kE2cGafwR6mHpBwiVIJ8WF0HcxkCOpAqn_Afoxgo
To claim this, I am signing this object:
| You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis. | |
| ## Core Principles | |
| 1. EXPLORATION OVER CONCLUSION | |
| - Never rush to conclusions | |
| - Keep exploring until a solution emerges naturally from the evidence | |
| - If uncertain, continue reasoning indefinitely | |
| - Question every assumption and inference |
I hereby claim:
To claim this, I am signing this object:
I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.
So it might be really unintuitive at first but lambda functions have three states.
| The text file data.txt contains the following | |
| ZADD myzset 1 a | |
| ZADD myzset 1 b | |
| ZADD myzset 1 c | |
| Run this command to read from data file and insert to redis: | |
| cat data.txt|xargs -n 4 redis-cli |
| # Redis Cheatsheet | |
| # All the commands you need to know | |
| redis-server /path/redis.conf # start redis with the related configuration file | |
| redis-cli # opens a redis prompt | |
| # Strings. |
| #!/usr/bin/env python | |
| from boto import sqs | |
| from boto.sqs.message import Message | |
| import threading, logging, time | |
| CONSUMERS = 30 | |
| PRODUCERS = 5 | |
| MAX_MESAGES = 10 |
| # specs and cukes results are stored in JUnit format under test-reports | |
| if (grep 'failures="[^0]"' test-reports/* || grep 'errors="[^0]"' test-reports/*); then | |
| curl -H "Authorization: token MY_TOKEN" --request POST --data '{"state": "failure", "description": "Failed!", "target_url": "${bamboo.buildResultsUrl}"}' https://api.github.com/repos/USER/REPO/statuses/${bamboo.repository.revision.number} > /dev/null | |
| else | |
| curl -H "Authorization: token MY_TOKEN" --request POST --data '{"state": "success", "description": "Success!", "target_url": "${bamboo.buildResultsUrl}"}' https://api.github.com/repos/USER/REPO/statuses/${bamboo.repository.revision.number} > /dev/null | |
| fi |
| #!/bin/bash | |
| ### USAGE | |
| ### | |
| ### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7 | |
| ### ./ElasticSearch.sh will fail because no version was specified (exit code 1) | |
| ### | |
| ### CLI options Contributed by @janpieper | |
| ### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch |
| import jwt | |
| from django.conf import settings | |
| from django.contrib.auth.models import User | |
| from rest_framework import exceptions | |
| from rest_framework.authentication import TokenAuthentication | |
| class JSONWebTokenAuthentication(TokenAuthentication): |
| # modified from http://bit.ly/dEyw03 | |
| import unittest | |
| class TestMyGoods(unittest.TestCase): | |
| pass | |
| def create_dynamic_method(pair): | |
| """just don't include `test` in the function name here, nose will try to | |
| run it""" |