Skip to content

Instantly share code, notes, and snippets.

View jcxia43's full-sized avatar
🚢
shipping

Junchen Xia jcxia43

🚢
shipping
View GitHub Profile
@jcxia43
jcxia43 / crawler
Last active August 29, 2015 14:03 — forked from kkosuge/gist:4744900
require "open-uri"
require "nokogiri"
require "pp"
base_url = "http://dribbble.com"
@file = File.open('dribbble_profile_urls.txt','w')
def get_web_link(url)
doc = Nokogiri::HTML(open(url))
doc.css('.profile-details .url').each do |link|
module Jekyll
# Sass plugin to convert .scss to .css
#
# Note: This is configured to use the new css like syntax available in sass.
require 'sass'
class SassConverter < Converter
safe true
priority :low
def matches(ext)
#!/bin/sh
SCRIPT="#!/bin/sh
if [ \${1} == \"--help\" ]; then
/usr/local/sublime_text_3/sublime_text --help
else
/usr/local/sublime_text_3/sublime_text \$@ > /dev/null 2>&1 &
fi"
curl -L "http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3047_x64.tar.bz2" -o "/tmp/sublime_text_3.tar.bz2"
cd /tmp
@jcxia43
jcxia43 / simplecrawler.py
Created April 26, 2012 11:34
Simple web crawler
import urllib
#this is just a very simple web crawler, can not actually do
#what a real web crawler do :)
#get the next link on the page,here page is the content of
#the HTML text, also a string
def get_next_link(page):
start_pos = page.find("<a href=")
if start_pos == -1: