Skip to content

Instantly share code, notes, and snippets.

Avatar
🦂
BAU

Hasnain Bukhari BukhariH

🦂
BAU
View GitHub Profile
@BukhariH
BukhariH / slope_vs_starting.md
Created Dec 3, 2019 — forked from gtallen1187/slope_vs_starting.md
A little bit of slope makes up for a lot of y-intercept
View slope_vs_starting.md

"A little bit of slope makes up for a lot of y-intercept"

01/13/2012. From a lecture by Professor John Ousterhout at Stanford, class CS140

Here's today's thought for the weekend. A little bit of slope makes up for a lot of Y-intercept.

[Laughter]

View gist:a6de426c6cd29db93ab582813442fb55
package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)
View gist:91990873c6b382ee09cb7849694a2d79
package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)
@BukhariH
BukhariH / iterm2-solarized.md
Created Jun 5, 2016 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + oh my zsh + solarized + Meslo powerline font (OSX)
View Added Linux
require 'json'
require 'net/http'
require 'uri'
require 'rbconfig'
require 'io/console'
puts "Enter Username:"
@username = gets.chomp
puts "Enter Password (input will be hidden):"
@password = STDIN.noecho(&:gets).chomp
@BukhariH
BukhariH / gist:9125653
Last active Mar 11, 2019 — forked from zobar/gist:1499822
How to run a bot on Heroku
View gist:9125653
  1. Add Heroku to your Gemfile and bundle install.
  2. Create your Heroku app. This will only work with their (currently-beta) 'cedar' stack, so you have to heroku create --stack=cedar.
  3. Create a Procfile for your bot. This tells Heroku how to run your worker. In our case, the bot is bot.rb, so the only line in the Procfile is cinch: bundle exec ./bot.rb
  4. Commit and push to Heroku.
  5. You do not want a Web worker running, so heroku scale web=0 cinch=1. This also sets up your deployments to restart the bot.