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
@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('/')
@jk195417
jk195417 / 使用 EB 部署 Rails app 至 AWS.md
Created March 16, 2017 13:21
EC2 + RDS,然後使用 Elastic Beanstalk 部署 Rails 應用程式

部署 Rails app 至 Amazon web services

EC2 + RDS + EB,使用 Elastic Beanstalk 部署應用程式

版本訊息

  • 作業系統 macOS Sierra 10.12.3
  • Ruby 2.3
  • Rails 5.0.1
  • MySQL 5.7.16

開始使用 Amazon web services

@sobstel
sobstel / nokogiri_install
Created January 3, 2017 17:30
nokogiri -> ERROR: cannot discover where libxml2 is located on your system
# `ERROR: Error installing nokogiri:
# ERROR: Failed to build gem native extension.
#
# current directory: /usr/local/var/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/nokogiri-1.7.0/ext/nokogiri
# /usr/local/var/rbenv/versions/2.3.1/bin/ruby -r ./siteconf20170103-68488-r71c9j.rb extconf.rb --with-xml=/usr/local/Cellar/libxml2/ --use-system-libraries
# checking if the C compiler accepts ... yes
# checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-future... no
# Building nokogiri using system libraries.
# ERROR: cannot discover where libxml2 is located on your system. please make sure `pkg-config` is installed.
# *** extconf.rb failed ***
@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
@sebmarkbage
sebmarkbage / react-terminology.md
Last active January 9, 2023 22:47
React (Virtual) DOM Terminology
@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"
@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
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
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
@paladini
paladini / aws-ec2-redis-cli.md
Last active February 20, 2024 04:05 — forked from todgru/aws-ec2-redis-cli.md
AWS redis-cli without redis server on AWS EC2

Setup redis-cli without the whole Redis Server on AWS EC2

This fast tutorial will teach you how to install redis-clion AWS EC2 without having to install the whole Redis Server. Firstly, SSH into your EC2 instance and run the following command:

$ sudo yum install gcc

This may return an "already installed" message, but that's OK. After that, just run:

$ wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make && sudo cp src/redis-cli /usr/local/bin/ && sudo chmod 755 /usr/local/bin/redis-cli