Skip to content

Instantly share code, notes, and snippets.

View phuphighter's full-sized avatar

Johnny Khai Nguyen phuphighter

View GitHub Profile

Keybase proof

I hereby claim:

  • I am phuphighter on github.
  • I am johnnyn (https://keybase.io/johnnyn) on keybase.
  • I have a public key ASC8jKLV-rngwDXbbG8LZxGTO6cRD9b-6B-ywt9fZcSRuQo

To claim this, I am signing this object:

@phuphighter
phuphighter / mediaqueries.css
Created June 29, 2016 14:10
Semantic UI friendly media queries
/* Mobile */
@media only screen and (max-width: 767px) {
[class*="mobile hidden"],
[class*="tablet only"]:not(.mobile),
[class*="computer only"]:not(.mobile),
[class*="large screen only"]:not(.mobile),
[class*="widescreen only"]:not(.mobile),
[class*="or lower hidden"] {
display: none !important;
}
@phuphighter
phuphighter / installation.sh
Created April 11, 2012 19:08 — forked from mikhailov/installation.sh
Nginx+passenger application config: ssl redirection, http headers, passenger optimal settings. see details: http://mikhailov.posterous.com/nginx
$ cd /usr/src
$ wget http://nginx.org/download/nginx-0.8.52.tar.gz
$ tar xzvf ./nginx-0.8.52.tar.gz
$ rm ./nginx-0.8.52.tar.gz
$ gem install s3sync capistrano capistrano-ext passenger --no-ri --no-rdoc
$ passenger-install-nginx-module
# Automatically download and install Nginx? 2. No: I want to customize my Nginx installation
# Where is your Nginx source code located?: /usr/src/nginx-0.8.52
# Where do you want to install Nginx to?: /opt/nginx
@phuphighter
phuphighter / juggernaut_heroku.md
Created February 5, 2012 17:23 — forked from maccman/juggernaut_heroku.md
Juggernaut on Heroku

Clone repo:

git clone git://github.com/maccman/juggernaut.git
cd juggernaut

Create Heroku app:

heroku create myapp --stack cedar
heroku addons:add redistogo:nano

git push heroku master

@phuphighter
phuphighter / publish_book.txt
Created January 19, 2012 18:24
Publish your book to the iBookstore
Publish your book to the iBookstore
You can request that your book be made available for public download by submitting it to the iBookstore.
Before you can publish your book to the iBookstore, you need to do the following:
-Create an iBookstore seller account.
-Download iTunes Producer, the application you use to submit your book to the iBookstore. After your iBookstore seller account is created, you can sign in to iTunes Connect and download iTunes Producer.
# Author: Pieter Noordhuis
# Description: Simple demo to showcase Redis PubSub with EventMachine
#
# Requirements:
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby
# - a browser with WebSocket support
#
# Usage:
# ruby redis_pubsub_demo.rb
#
@phuphighter
phuphighter / gist:530357
Created August 17, 2010 15:19
Static site on Heroku
use Rack::Static, :urls => ["/stylesheets", "/images", "/javascripts"], :root => "public"
run lambda { |env| [200, { 'Content-Type' => 'text/html', 'Cache-Control' => 'public, max-age=86400' }, File.open('public/index.html', File::RDONLY)] }
##
# This small script is an example of what you can do with the superfeedr :
# we monitor a few feeds with superfeedr and when, these feeds actually have
# new messages, we are posting them to a twitter account.
require "rubygems"
require "twitter"
require "superfeedr"
#############################################################
# Author: Pieter Noordhuis
# Description: Simple demo to showcase Redis PubSub with EventMachine
#
# Requirements:
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby
# - a browser with WebSocket support
#
# Usage:
# ruby redis_pubsub_demo.rb
#