Skip to content

Instantly share code, notes, and snippets.

View astraloverflow's full-sized avatar

Samuel Champagne astraloverflow

View GitHub Profile
@staltz
staltz / introrx.md
Last active May 23, 2024 20:07
The introduction to Reactive Programming you've been missing
@claybridges
claybridges / unicode_bracketish.txt
Last active March 3, 2023 13:39
Comes from this SO answer: http://stackoverflow.com/a/13535289/45813. Per answerer's direction, `DOUBLE ANGLE QUOTATION MARK`s edited to correct for bash error.
LEFT PARENTHESIS (U+0028, Ps): (
RIGHT PARENTHESIS (U+0029, Pe): )
LEFT SQUARE BRACKET (U+005B, Ps): [
RIGHT SQUARE BRACKET (U+005D, Pe): ]
LEFT CURLY BRACKET (U+007B, Ps): {
RIGHT CURLY BRACKET (U+007D, Pe): }
LEFT-POINTING DOUBLE ANGLE QUOTATION MARK (U+00AB, Pi): «
RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK (U+00BB, Pf): »
TIBETAN MARK GUG RTAGS GYON (U+0F3A, Ps): ༺
TIBETAN MARK GUG RTAGS GYAS (U+0F3B, Pe): ༻
@thoop
thoop / .htaccess
Last active January 27, 2024 14:07
Official prerender.io .htaccess for Apache.
# Change YOUR_TOKEN to your prerender token
# Change http://example.com (at the end of the last RewriteRule) to your website url
<IfModule mod_headers.c>
RequestHeader set X-Prerender-Token "YOUR_TOKEN"
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
@basus
basus / fizzbuzz.ml
Created April 30, 2013 23:53
Variations of Fizzbuzz in OCaml, translated from the Rust version in "FizzBuzz Revisited" by Lindsey Kuper: http://composition.al/blog/2013/03/02/fizzbuzz-revisited/
(* Variations of Fizzbuzz in OCaml, translated from the Rust version in
"FizzBuzz Revisited" by Lindsey Kuper:
http://composition.al/blog/2013/03/02/fizzbuzz-revisited/ *)
(* The FizzBuzz test proposed by Imran Ghory:
http://imranontech.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/ *)
(* and made famous by Jeff Atwood:
http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html *)
@cobyism
cobyism / gh-pages-deploy.md
Last active May 23, 2024 10:55
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@philtomson
philtomson / gist:1021309
Created June 12, 2011 06:39
FizzBuzz OCaml
let fizzbuzz i = match ((i mod 3), (i mod 5)) with
| (0,0) -> "fizzbuzz"
| (_,0) -> "buzz"
| (0,_) -> "fizz"
| (_,_) -> string_of_int i ;;
let do_fizzbuzz n = for i = 1 to n do
Printf.printf "%s\n" (fizzbuzz i)
done ;;