Skip to content

Instantly share code, notes, and snippets.

View dreikanter's full-sized avatar

Alex Musayev dreikanter

View GitHub Profile
@dreikanter
dreikanter / README.md
Last active November 22, 2015 12:33
Comment author name

The first image version is a normal thread. Second one has redundant user names removed.

@dreikanter
dreikanter / introrx.md
Created October 10, 2015 10:28 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@dreikanter
dreikanter / topic-policy.json
Created September 25, 2015 15:26
SNS topic policy for S3 notifications
{
"Version": "2008-10-17",
"Id": "__default_policy_ID",
"Statement": [
{
"Sid": "__default_statement_ID",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
@dreikanter
dreikanter / wishlist-2015.md
Last active December 25, 2015 14:12
wishlist-2015.md
@dreikanter
dreikanter / auth.rb
Created March 9, 2015 11:04
Facebook auth object
{
"provider" => "facebook",
"uid" => "1234567890",
"info" => {
"email" => "lwibbob_occhinoson_1234567890@tfbnw.net",
"name" => "Donna Amibecffjfgc Occhinoson",
"first_name" => "Donna",
"last_name" => "Occhinoson",
"image" => "http://graph.facebook.com/1234567890/picture",
"urls" => {

HTTP status code symbols for Rails

1xx - Informational

Status Code Status Message Symbol
100 Continue :continue
101 Switching Protocols :switching_protocols
102 Processing :processing
@dreikanter
dreikanter / emberjs-cheat-sheet.md
Last active December 11, 2023 05:01
Ember.js Cheat Sheet

Core concepts

Model

  • An object that stores data (data persistance layer abstraction).
  • Templates transforms models into HTML.
  • Same thing as Rails model.

Template

@dreikanter
dreikanter / image_archive_action.rb
Last active August 29, 2015 14:10
File renaming action for Dropzone 3
# Dropzone Action Info
# Name: Archive Image
# Description: Save imge to specified forder, and rename it to YYYYMMDD format.
# Handles: Files
# Creator: Alex Musayev
# URL: http://yoursite.com
# Events: Dragged
# KeyModifiers: Command, Option, Control, Shift
# SkipConfig: No
# RunsSandboxed: Yes
@dreikanter
dreikanter / README.md
Last active August 29, 2015 14:10
Setting up Beyound Compare 4 as diff/merge tool for SVN console client on OS X

Beyond Compare 4 ❤️ SVN @ OS X

Put this to /usr/local/bin/bcdiff:

/usr/local/bin/bcompare "$6" "$7" -title1="$3" -title2="$5" -readonly
exit 0

Put his to /usr/local/bin/bcmerge:

/usr/local/bin/bcompare "$2" "$3" "$1" "$4"

@dreikanter
dreikanter / gist:2239150ccfa518429c22
Created August 24, 2014 14:41
Rack::Request object environment variables example
#<Rack::Request:0x007f92241da138
@env=
{"GATEWAY_INTERFACE"=>"CGI/1.1",
"PATH_INFO"=>"",
"QUERY_STRING"=>"",
"REMOTE_ADDR"=>"127.0.0.1",
"REMOTE_HOST"=>"localhost",
"REQUEST_METHOD"=>"GET",
"REQUEST_URI"=>"http://localhost:9292/sum/1/b",
"SCRIPT_NAME"=>"/sum/1/b",