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 | |
# | |
# This script makes an empty Swift file template. | |
# | |
# Usage: | |
# | |
# sudo ./change_xcode_template | |
# | |
# or specify the Xcode app name |
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 | |
# | |
# Script for Xcode and Carthage | |
# ------------------------------ | |
# | |
# Dismisses changes to all the frameworks except the given frameworks in the iOS build folder. | |
# This is used to undo the changes done to the framework build after `carthage update` command. | |
# | |
# |
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
// | |
// Creates a timer that executes code after delay. The timer lives in an instance of `AutoCancellingTimer` class and is automatically canceled when this instance is deallocated. | |
// This is an auto-canceling alternative to timer created with `dispatch_after` function. | |
// | |
// Source: https://gist.github.com/evgenyneu/516f7dcdb5f2f73d7923 | |
// | |
// Usage | |
// ----- | |
// | |
// class MyClass { |
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 | |
# | |
# Combines *.swift files into a single file. Used in Xcode to build a single swift distributive file. | |
# | |
# Here is how to use it in Xcode: | |
# | |
# 1. Create an "External build system" target. | |
# 2. Click "Info" tab in target settings. | |
# 3. In "Build Tool" field specify the path to this script file, for example: $PROJECT_DIR/scripts/concatenate_swift_files.sh |
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
Show hidden characters
{ | |
"cmd": ["/Library/TeX/texbin/pdflatex '$file' && open -a Skim.app '$file_path/$file_base_name.pdf'"], | |
"shell": true, | |
"selector": "text.tex.latex" | |
} |
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
ACCESS_TOKEN=secret | |
ENVIRONMENT=production | |
LOCAL_USERNAME=`whoami` | |
REVISION=`git log -n 1 --pretty=format:"%H"` | |
curl https://api.rollbar.com/api/1/deploy/ \ | |
-F access_token=$ACCESS_TOKEN \ | |
-F environment=$ENVIRONMENT \ | |
-F revision=$REVISION \ | |
-F local_username=$LOCAL_USERNAME |
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
{ | |
"cmd": ["/Library/TeX/texbin/pdflatex","$file"], | |
"selector": "text.tex.latex", | |
"variants": [ | |
{ | |
"name": "Build Bibliography", | |
"cmd": ["/Library/TeX/texbin/bibtex","$file_base_name"], | |
} | |
] | |
} |
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
{ | |
"cmd": ["mkdir -p metafiles && /Library/TeX/texbin/pdflatex -output-directory metafiles '$file'"], | |
"shell": true, | |
"selector": "text.tex.latex" | |
} |
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
%YAML 1.2 | |
--- | |
# http://www.sublimetext.com/docs/3/syntax.html | |
name: C/C++(11) | |
file_extensions: | |
- i | |
first_line_match: |- | |
(?x) | |
-[*]-( Mode:)? C -[*]- | |
| |
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
import numpy as np | |
from scipy import stats | |
import matplotlib.pyplot as plt | |
def find_posterior(M, N, p, p_hpdi): | |
""" | |
We have a bag containing black and white marbles, `M` in total. | |
We don't know how many black marbles are in the bag. | |
We take `N` from the bag and count the proportion of black marbles `p`. |
OlderNewer