Skip to content

Instantly share code, notes, and snippets.

WooodHead

Block or report user

Report or block WooodHead

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@WooodHead
WooodHead / delete_git_submodule.md
Created Nov 27, 2019 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.
View delete_git_submodule.md

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@WooodHead
WooodHead / keybez.md
Created Nov 8, 2019 — forked from jondot/keybez.md
ios keyboard bezier
View keybez.md
  onKeyboardWillHide(e) {
    Animated.timing(this.state.height, {
      toValue: this.listViewMaxHeight,
      duration: e.duration,
      easing: Easing.bezier(0.1, 0.76, 0.55, 0.9)
    }).start();
  },

  onKeyboardWillShow(e) {
@WooodHead
WooodHead / schema.sql
Created Oct 4, 2019 — forked from hays-hutton/schema.sql
A Simplified Schema Example for PostgREST
View schema.sql
CREATE EXTENSION IF NOT EXISTS pgcrypto;
CREATE TABLE IF NOT EXISTS
users (
email TEXT PRIMARY KEY CHECK ( email ~* '^.+@.+\..+$' ),
pass TEXT NOT NULL CHECK (length(pass) < 256),
role NAME NOT NULL CHECK (length(role) < 256)
);
CREATE TABLE IF NOT EXISTS
@WooodHead
WooodHead / output.json
Created Oct 3, 2019 — forked from canuckistani/output.json
Get 10k extensions from the chrome web store.
View output.json
[
"https://chrome.google.com/webstore/detail/ballloon-for-chrome/kbmligehjhghebleanjcmenomghmcohn",
"https://chrome.google.com/webstore/detail/shine-for-reddit/acoiihnnfofnpbnofdcgcapbjlcopifa",
"https://chrome.google.com/webstore/detail/tag-assistant-by-google/kejbdjndbnbjgmefkgdddjlbokphdefk",
"https://chrome.google.com/webstore/detail/highly-highlighter/hjpahjhcglfdopbholajmhpamgblhjhg",
"https://chrome.google.com/webstore/detail/screencastify-screen-vide/mmeijimgabbpbgpdklnllpncmdofkcpn",
"https://chrome.google.com/webstore/detail/sms-from-gmail-facebook-m/iffdacemhfpnchinokehhnppllonacfj",
"https://chrome.google.com/webstore/detail/wot-web-of-trust-website/bhmmomiinigofkjcapegjjndpbikblnp",
"https://chrome.google.com/webstore/detail/mega/bigefpfhnfcobdlfbedofhhaibnlghod",
"https://chrome.google.com/webstore/detail/time-is-money/ooppbnomdcjmoepangldchpmjhkeendl",
@WooodHead
WooodHead / gist:a9efd895d98969d83a8223bccbc568d3
Created Oct 3, 2019 — forked from sshay77/gist:4b1f6616a7afabc1ce2a
google-search-url-parameters-query-string-
View gist:a9efd895d98969d83a8223bccbc568d3
// ==UserScript==
// @name Google Search Better Privacy
// @description Delete unnecessary params and add useful params on Google Search.
// @version 0.0.4
// @include http://*.google.*/search*
// @include http://*.google.*/imgres*
// @include https://*.google.*/search*
// @include https://*.google.*/imgres*
// @exclude http://play.google.com/*
// @exclude http://mail.google.com/*
@WooodHead
WooodHead / scrapy-installation.md
Created Aug 4, 2019 — forked from samiujan/scrapy-installation.md
How to install Scrapy on Ubuntu
View scrapy-installation.md

Scrapy is the web-scraper's scraper - it handles typical issues like distributed, asynchronous crawling, retrying during down-time, throttling download speeds, pagination, image downloads, generates beautiful logs and does much much more

You need a few modules to run scrapy on a Ubuntu/Debian machine (I used a cloud-based Ubuntu 14.04.4 LTS)

Following are the steps (and some recommendations)

The following was executed on a vanilla DigtialOcean Ubuntu (5 USD per month, 512 MB RAM). I feel this is sufficient to run a Scrapy crawler running at approx 1 HTTP request per second (with auto-throttle and delays turned on)

sudo apt-get update
@WooodHead
WooodHead / puppeteer-gif.js
Created May 22, 2019 — forked from bambooom/puppeteer-gif.js
use puppeteer to generate gif
View puppeteer-gif.js
const fs = require('fs');
const puppeteer = require('puppeteer');
const GIFEncoder = require('gifencoder');
const PNG = require('png-js');
function decode(png) {
return new Promise(r => {png.decode(pixels => r(pixels))});
}
@WooodHead
WooodHead / libreadline_6_not_found.sh
Created Mar 25, 2019 — forked from wbotelhos/libreadline_6_not_found.sh
Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib (LoadError)
View libreadline_6_not_found.sh
ln -s /usr/local/opt/readline/lib/libreadline.7.0.dylib /usr/local/opt/readline/lib/libreadline.6.dylib
@WooodHead
WooodHead / aria2c_webUI.md
Created Mar 25, 2019 — forked from GAS85/aria2c_webUI.md
Aria2 + Ubuntu 16.04 + Apache2 + Web UI
View aria2c_webUI.md
OS: Ubuntu 16.04 Apache/2.4.18 1.0.2g-1ubuntu4.10
Aim: to install Aria2 with WebUI and secure Token.
IP Addr of your Aria2 server is 111.222.111.222
Your local IP network is 192.168.0.0/24

Aria 2

1. Installation

Install aria2 package:

@WooodHead
WooodHead / git-collaborative-workflow.md
Created Feb 13, 2019 — forked from adamloving/git-collaborative-workflow.md
Simple Git workflow for collaborating on a project. I wrote this to help a co-worker learn Git (and help me remember after a year of working on my own).
View git-collaborative-workflow.md

Creating the change

$ git checkout -b my-feature

... modify code ....

$ git add <filename> 
$ git commit -m “my feature is this”
You can’t perform that action at this time.