Skip to content

Instantly share code, notes, and snippets.

View rupakg's full-sized avatar
😎
drinking from the firehose...

Rupak Ganguly rupakg

😎
drinking from the firehose...
View GitHub Profile
@StefanH
StefanH / install_ruby.sh
Last active December 23, 2015 00:09
install ruby on precise64 vagrant box
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p429.tar.gz
tar -xvzf ruby-1.9.3-p429.tar.gz
cd ruby-1.9.3-p429/
./configure --prefix=/usr/local
make
make install
@aaronksaunders
aaronksaunders / TiParse.js
Last active December 3, 2017 11:46
UPDATED PROJECT: http://bit.ly/1p61VRC Tested w/ latest version of parse "parse-1.2.18.js" I took a look at the latest Parse update to the APIs and they have made it even more complex to integrate Appcelerator and Facebook since they have integrated the FB Javascript API into the Parse Module directly.this hack just overrides the FB functions th…
/**
*
* Aaron K. Saunders
* twitter: @aaronksaunders
* last updated may 23, 2014
*
* See more Appcelerator Information on Clearly Innovative Blog
*
* www.clearlyinnovative.com
* blog.clearlyinnovative.com
# DOCKER-VERSION 0.6.4
# 13.10 - 04 has a missing ppa for postgresql 9.2 at the moment (26/10/2013)
FROM ubuntu:12.10
MAINTAINER Sam Saffron "https://twitter.com/samsaffron"
RUN apt-get -y update &&\
apt-get -y upgrade &&\
apt-get -y install software-properties-common &&\
@nathansmith
nathansmith / kill-magento-iframe.sass
Last active December 28, 2015 22:39
Hide unnecessary <iframe> in Magento.
// This matches any <iframe> that is used to overlay content.
//
// Example:
//
// <iframe style="... z-index ..."></iframe>
@media screen and (max-width: $media-mobile-max)
iframe[style*="z-index"]
display: none
@emad-elsaid
emad-elsaid / weather.rb
Created February 21, 2014 14:53
get wheather of any city using ruby
require 'open-uri'
require 'json'
require 'psych'
city = 'portsaid,egypt'
request = "http://api.openweathermap.org/data/2.5/weather?q=#{city}"
response = open(request).readlines.join
print Psych.dump( JSON.parse(response) )
@Integralist
Integralist / Hash Keys to Symbols.rb
Last active September 2, 2020 08:50
Convert Ruby Hash keys into symbols
hash = { 'foo' => 'bar' }
# Version 1
hash = Hash[hash.map { |k, v| [k.to_sym, v] }]
# Version 2
hash = hash.reduce({}) do |memo, (k, v)|
memo.tap { |m| m[k.to_sym] = v }
end

Preview build: Container grouping and stack composition

NOTE: this is out of date - refer to moby/moby#9694

Here is a preview build of two new features we’re working on concurrently: container grouping (docker groups) and stack composition (docker up). Together, they will eventually form a complete replacement for Fig.

@dpetersen
dpetersen / demo.go
Last active August 29, 2015 14:13
Friday demo
package demo
// The Savable interface should be implemented by any resource associated with
// an Account that can be persisted.
type Savable interface {
Save(Account) (string, error)
}
// An Account ties together all records associated with a single client.
//
@franz-josef-kaiser
franz-josef-kaiser / nano-shorts.md
Last active August 2, 2025 10:30
nano keyboard shortcuts

^ = Ctrl key M = Alt key

^G      (F1)            Display this help text
^X      (F2)            Close the current file buffer / Exit from nano
^O      (F3)            Write the current file to disk
^J      (F4)            Justify the current paragraph

^R      (F5)            Insert another file into the current one
@chrismdp
chrismdp / s3.sh
Last active August 4, 2025 07:29
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1