Skip to content

Instantly share code, notes, and snippets.

View WooodHead's full-sized avatar

WooodHead

  • Hangzhou
View GitHub Profile
@WooodHead
WooodHead / crawler.py
Created November 4, 2017 03:18 — forked from vinovator/crawler.py
Crawl a page and extract all urls recursively within same domain
# crawler.py
# Python 2.7.6
"""
Crawl a page and extract all urls recursively within same domain
"""
from BeautifulSoup import BeautifulSoup
@WooodHead
WooodHead / url_scrape.py
Created November 4, 2017 03:23 — forked from falkben/url_scrape.py
scrapes a website for all the URLs below it
''' scrapes a website for urls '''
import requests
from bs4 import BeautifulSoup
class URLTest():
def __init__(self, link, status_code, current_depth, head):
self.link = link
self.status_code = status_code
@WooodHead
WooodHead / a.md
Created November 4, 2017 03:57 — forked from mala/a.md
Chrome ExtensionのLive HTTP Headersの調査(CoolBar.Pro導入 Extensionが何を行うかの調査)

Chrome ExtensionのLive HTTP Headersを調査した。Firefox用のものではない。Firefox用のものではない。

11/7追記

English version: https://translate.google.com/translate?sl=ja&tl=en&js=y&prev=_t&hl=ja&ie=UTF-8&u=https%3A%2F%2Fgist.github.com%2Fmala%2Fe87973df5029d96c9269d9431fcef5cb&edit-text=&act=url

Summary in english.

@WooodHead
WooodHead / latest-ffmpeg-centos6.sh
Created November 14, 2017 14:13 — forked from mustafaturan/latest-ffmpeg-centos6.sh
Installs latest ffmpeg on Centos 6
# source: https://trac.ffmpeg.org/wiki/CentosCompilationGuide
yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
tar xzvf yasm-1.2.0.tar.gz
cd yasm-1.2.0
@WooodHead
WooodHead / gist:55d9492aa73c6fb7a47b58091d391e85
Created November 26, 2017 12:05 — forked from apocas/gist:4583334
Node NPM registry crawler.
var jsdom = require('jsdom'),
request = require('request'),
url = require('url'),
npm = require("npm"),
redis = require("redis");
var client = redis.createClient();
var configObject = {
"dev": false,
@WooodHead
WooodHead / crawler.js
Created November 26, 2017 12:35 — forked from kyrcha/crawler.js
npm registry crawler
var request = require('request'),
cheerio = require('cheerio'),
async = require('async');
var base = 'https://www.npmjs.org',
concurrency = 2;
var q = async.queue(function(task, next) {
setTimeout(function() {
console.log('GET ' + task.url);
@WooodHead
WooodHead / uri.js
Created December 14, 2017 02:13 — forked from jlong/uri.js
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"
@WooodHead
WooodHead / batch-unsubscribe-youtube
Created December 16, 2017 08:13
copy this to console
setInterval(function(){document.querySelector('.subscription-options .yt-uix-button.yt-uix-button-size-default.yt-uix-button-subscribed-branded.yt-uix-button-has-icon.no-icon-markup.yt-uix-subscription-button.yt-can-buffer').click();},10);

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets