Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View tundal45's full-sized avatar
👻
there is more to life than coding

Ashish Dixit tundal45

👻
there is more to life than coding
View GitHub Profile
@xaviershay
xaviershay / build_frontend.sh
Last active December 24, 2015 20:49
SASS + Coffee + Concatenation in prod
#!/bin/bash
set -exo pipefail
BUILD_ENV=$1
if [ `uname` == 'Darwin' ]; then
OSX=1
JSCOMPRESSOR="yuicompressor --type js"
else
OSX=
@jbenet
jbenet / simple-git-branching-model.md
Last active April 9, 2024 03:31
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@adelcambre
adelcambre / server.rb
Created September 26, 2013 17:27
A small bit of code to demonstrate the Sockets API in Ruby via a very tiny, very bad, web server.
require 'socket'
NOT_FOUND = "HTTP/1.1 404 Not Found\nContent-Length: 9\n\nNot Found"
OK = "HTTP/1.1 200 OK\n"
socket = Socket.new(:INET, :STREAM)
sockaddr = Socket.sockaddr_in(11080, '127.0.0.1')
socket.bind(sockaddr)
socket.listen(5)
@busterbenson
busterbenson / markov_tweets.rb
Created September 25, 2013 05:05
How I do @buster_ebooks.
#!/usr/bin/ruby
# Make sure you have these gems installed
require 'rubygems'
require 'thread'
require 'csv'
require 'twitter'
require 'marky_markov'
# Create a new Twitter account that you'd like to have your auto-tweets posted to
Programming Elixer
http://pragprog.com/book/elixir/programming-elixir
Programming Clojure
http://pragprog.com/book/shcloj2/programming-clojure
Web Development with Clojure
http://pragprog.com/book/dswdcloj/web-development-with-clojure
Purely Functional Data Structures
@jmtame
jmtame / gist:6458832
Last active March 26, 2018 07:49
ruby blocks and yield explained by a bloc mentor

The following is an explanation of Ruby blocks and yield by another Bloc mentor (Adam Louis) who was trying to explain it to one of his students.

On my very first day programming, if someone asked me for "the sum of the numbers from 1 to 10", I'd have written:

puts 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10

Easy enough.

@coreyhaines
coreyhaines / Applications
Last active December 21, 2015 05:39
Installing new computer
Chrome
Alfred
Dropbox
1Password
Sizeup
Twitter
Coconut Battery
Dash
XCode
Caffeine
@jasoncodes
jasoncodes / vim_tips.markdown
Last active December 21, 2015 00:08
Vim Tips

Vim Tips

fresh

Build your dotfiles (shell, Vim config) from multiple sources with fresh.

Both of our dotfiles are built using fresh. We source Vim and other config from each other:

@jed
jed / how-to-set-up-stress-free-ssl-on-os-x.md
Last active February 25, 2024 17:35
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

@robmiller
robmiller / .gitconfig
Created July 17, 2013 07:52
Some useful Git aliases that I use every day
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"