Skip to content

Instantly share code, notes, and snippets.

View nordringrayhide's full-sized avatar

Nodrin Grayhide nordringrayhide

  • home
  • Worldwide
View GitHub Profile
@nordringrayhide
nordringrayhide / vimify.sh
Created March 19, 2012 09:16
My vimrc file
#!/bin/sh
mkdir -p ~/.vim/bundle/vundle
git clone git://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
wget https://raw.github.com/gist/2104598/fb27ed1e0434575ede483df96692d93a626b1116/vimrc-with-vandle-support.vim \
-O ~/.vimrc
vim +BundleInstall +qall
@scottandrus
scottandrus / gist:4081316
Created November 15, 2012 21:15
AFNetworking Image Downloads with Download Progress Block
- (void)downloadMultiAFN {
// Basic Activity Indicator to indicate download
UIActivityIndicatorView *loading = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
[loading startAnimating];
[self.imageView.superview addSubview:loading];
loading.center = self.imageView.center;
// Create a request from the url, make an AFImageRequestOperation initialized with that request
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:self.picUrl]];
AFImageRequestOperation *op = [[AFImageRequestOperation alloc] initWithRequest:request];
@robertsosinski
robertsosinski / db.rake
Created December 25, 2012 15:23
Database rake tasks for Sequel
namespace :db do
desc "Migrates the database to the target version, or to the lastest version if no target is given"
task :migrate, [:target, :current] => :environment do |t, args|
opts = {}
opts[:target] = args[:target].to_i if args[:target]
opts[:current] = args[:current].to_i if args[:current]
Sequel::Migrator.run(DB, "db/migrate", opts)
Rake::Task["db:dump"].invoke if Rails.env.development?
end
@ngauthier
ngauthier / README.md
Last active December 8, 2023 13:56
install ruby 2.0.0-p0 on ubuntu
@oivoodoo
oivoodoo / routes.rake
Created March 5, 2013 10:06
rake task for printing grape routes.
namespace :grape do
desc 'Print compiled grape routes'
task :routes => :environment do
API.routes.each do |route|
puts route
end
end
end
@willurd
willurd / web-servers.md
Last active July 20, 2025 19:06
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@linjunpop
linjunpop / deploy-rails-4-app-with-dokku-on-digital-ocean.md
Last active September 11, 2024 10:21
Deploy Rails 4 app with Dokku on DigitalOcean

Deploy Rails 4 app with Dokku on DigitalOcean

Install dokku

First create a Ubuntu 13.04 x64 droplet on DigitalOcean Control Panel

Then ssh with root account, run this in termianl:

$ wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash
@brianpattison
brianpattison / .git config
Last active December 25, 2015 15:59
Dokku command line tool
[core]
...
[remote "dokku"]
url = git@remote:appname
fetch = +refs/heads/*:refs/remotes/dokku/*
@gbuesing
gbuesing / ml-ruby.md
Last active June 6, 2025 20:52
Resources for Machine Learning in Ruby

UPDATE a fork of this gist has been used as a starting point for a community-maintained "awesome" list: machine-learning-with-ruby Please look here for the most up-to-date info!

Resources for Machine Learning in Ruby

Gems

@masonforest
masonforest / Dockerfile
Last active March 18, 2020 16:34
Test Drive Your Dockerfiles with RSpec and ServerSpec
FROM ubuntu:14.04
MAINTAINER Mason Fischer <[email protected]>
RUN apt-get update && apt-get install -y nodejs