Skip to content

Instantly share code, notes, and snippets.

View fbukevin's full-sized avatar
🏠
Working from home

Veck Hsiao fbukevin

🏠
Working from home
View GitHub Profile
@mojodna
mojodna / Procfile
Created September 29, 2011 20:22 — forked from RandomEtc/Procfile
Getting Kue working on Heroku
web: node app.js
worker: node consumer.js
@pete911
pete911 / python simple http server
Created March 22, 2012 17:40
basic python http server
import BaseHTTPServer
class Handler(BaseHTTPServer.BaseHTTPRequestHandler):
mappings = {'/' : {'GET' : 'test'}}
def main_handler(self, method='GET'):
# get request url (without url params) and remove trailing /
request_url = self.path.split('?')[0].rstrip('/')
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@jwo
jwo / mysql.database.yml
Last active March 28, 2024 15:32
Sample config/database.yml from Rails. Postgres, MySQL, and SQLite
#
# Install the MYSQL driver
# gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
describe "GET #index" do
#describe "POST #create" do
#describe "GET #show" do
#describe "PATCH #update" do (or PUT #update)
#describe "DELETE #destroy" do
#describe "GET #new" do
@sebmarkbage
sebmarkbage / react-terminology.md
Last active January 9, 2023 22:47
React (Virtual) DOM Terminology
@jlehikoinen
jlehikoinen / setup.sh
Last active March 4, 2021 13:12
Swift syntax highlighting for Vim
# Swift syntax highlighting for Vim
# Source: http://wingsquare.com/blog/swift-script-syntax-highlighting-and-indentation-for-vim-text-editor/
echo "--- Installing and configuring Pathogen.."
mkdir -p ~/.vim/autoload ~/.vim/bundle
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
echo "execute pathogen#infect()
syntax on
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
@cicorias
cicorias / Dockerfile
Last active April 5, 2024 08:40
Simple HTTP server in Docker
###
FROM mhart/alpine-node
RUN npm install -g http-server
WORKDIR /site
ADD ./ /site
# The default port of the application
@LeCoupa
LeCoupa / redis_cheatsheet.bash
Last active March 18, 2024 09:08
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.