git log --since 2017/12/01 --until 2017/12/07 --oneline
# Logs last week in Linux
git log --since "`date -d '1 week ago' '+%Y/%m/%d'`" --oneline
# Logs last week in OSX
git log --since "`date -v-1w '+%Y/%m/%d'`" --oneline
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
require 'json' | |
require 'uri' | |
class Prerender | |
ENDPOINTS = "https://api.prerender.io".freeze | |
def initialize(url, prerender_token) | |
@url = url | |
@prerender_token = prerender_token |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove all branches in https://github.com/<username>/<repo>/branches | |
document.querySelectorAll("svg.octicon.octicon-trashcan").forEach(function(e) { e.parentNode.click() }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"0162": "032", | |
"0163": "033", | |
"0164": "034", | |
"0165": "035", | |
"0166": "036", | |
"0167": "037", | |
"0168": "038", | |
"0169": "039", | |
"0120": "070", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work. | |
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0." | |
Database files have to be updated before starting the server, here are the steps that had to be followed: | |
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default | |
brew unlink postgresql | |
brew install [email protected] | |
brew unlink [email protected] | |
brew link postgresql |
With gem install
$ gem install eventmachine -v '1.0.7' --with-cppflags=-I/usr/local/opt/openssl/include
With bundler:
- Make sure you have bundle config file
~/.bundle/config
- Add options when building gem
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* How to change theme: | |
* Replace the file in .config/chromium/Default/Extensions/[APP_ID]/[APP_VERSION]/css/style.css with this file. | |
*/ | |
:root { | |
--base3: #fdf6e3; | |
--base1: #93a1a1; | |
--blue: #268bd2; | |
--green: #859900; |
NewerOlder