- XCode
- Install XCode from App store
- Get command line tools
- Homebrew
- Install Homebrew
- Terminal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while (tput cols && sleep 1)do; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#### GITSHOTS #### | |
# to install place in the hooks directory of a git repo and make it executeable. | |
# requires fswebcam: https://github.com/fsphil/fswebcam | |
gitshotsDir="/home/douglas/media/pictures/.gitshots" | |
logFile="gitshots.log" | |
fswebcam --no-banner $gitshotsDir/`date +'%s'`.jpg -r 1280x720 -S 10 --log $gitshotsDir/$logFile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while (cat text.txt | wc -l && sleep 30)do; done > timing.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traceback (most recent call last): | |
File "/home/douglas/devel/envs/forkchess/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__ | |
return self.wsgi_app(environ, start_response) | |
File "/home/douglas/devel/envs/forkchess/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app | |
response = self.make_response(self.handle_exception(e)) | |
File "/home/douglas/devel/envs/forkchess/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception | |
reraise(exc_type, exc_value, tb) | |
File "/home/douglas/devel/envs/forkchess/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app | |
response = self.full_dispatch_request() | |
File "/home/douglas/devel/envs/forkchess/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# This commit-msg git hook takes a commit message as it first argument. | |
# It's purpose is to ensure that the message starts with "VA-XXXX" | |
import sys | |
import re | |
pattern = r"^[Vv][Aa]-\d+[\s\.]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Test(object): | |
@property | |
def test1(self): | |
return potentially_expensive_call() | |
@property | |
def test2(self): | |
if not hasattr(self, "_test2"): | |
self._test2 = potentially_expensive_call() | |
return self._test2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while : | |
do | |
curl -s -o /dev/null -w "server 1: %{http_code}\n" -d "{'fake':'data'}" http://192.168.100.10:4000/bigcommerce/webhook/ \ | |
&& curl -s -o /dev/null -w "server 2: %{http_code}\n" -d "{'fake':'data'}" http://192.168.100.10:4001/bigcommerce/webhook/ | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--------------------------------------------------------------------------- | |
IndexError Traceback (most recent call last) | |
<ipython-input-40-94d5373ebb80> in <module>() | |
----> 1 p = sh_api.client.Order.find(status="any", limit=250, page=38) | |
/data/virtualenv/satellite/lib/python2.7/site-packages/pyactiveresource/activeresource.pyc in find(cls, id_, from_, **kwargs) | |
383 return cls._find_single(id_, **kwargs) | |
384 | |
--> 385 return cls._find_every(from_=from_, **kwargs) | |
386 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copy this into a python shell | |
from django.contrib.auth.models import User | |
from core.models import Member | |
from random import randint | |
from faker import Faker | |
faker = Faker() | |
for i in range(100): | |
u = User.objects.create_user( |
OlderNewer