System Preferences > General > Use dark menu bar and Dock
See if your menu bar icons can be switched to black, so they appear white for dark menu bar, most apps have an option in settings.
Add the following in .zshrc: | |
... | |
plugins=(osx git zsh-autosuggestions zsh-syntax-highlighting zsh-nvm docker kubectl) | |
... | |
### Fix slowness of pastes with zsh-syntax-highlighting.zsh | |
pasteinit() { | |
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]} | |
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`? |
#/bin/bash | |
launchctl stop com.qiuyuzhou.shadowsocksX-NG.local | |
launchctl stop com.qiuyuzhou.shadowsocksX-NG.http | |
launchctl stop com.qiuyuzhou.shadowsocksX-NG.kcptun | |
sudo rm -rf /Applications/ShadowsocksX-NG*.app | |
sudo rm -rf /Library/Application\ Support/ShadowsocksX-NG | |
sudo rm -rf ~/Library/Application\ Support/ShadowsocksX-NG | |
sudo rm -rf ~/Library/LaunchAgents/com.qiuyuzhou.shadowsocksX-NG.* |
/** | |
* To apply the theme: | |
* 1) Open dev tools with CTRL + SHIFT + I | |
* 2) Go to the console | |
* 3) Paste the following code | |
* Note: You will have to do this again whenever Github Desktop updates | |
*/ | |
const fs = require('fs'); | |
const path = require('path'); |
System Preferences > General > Use dark menu bar and Dock
See if your menu bar icons can be switched to black, so they appear white for dark menu bar, most apps have an option in settings.
Want to swap development databases? Sick of dropping, migrating and setting up databases when swtiching branches? This ⚡️ talk's for you!
The sections Configuring a Database and Connection Preference in the Rails Guides explains that there are two ways to configure your DB.
require 'benchmark/ips' | |
module ExtraMath | |
def self.build_math(attr_name) | |
attr_name = attr_name.to_s | |
class_eval %Q{ | |
def #{attr_name}(x) | |
x + x | |
end | |
} |
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9000)" != "200" ]]; do sleep 5; done' | |
# also check https://gist.github.com/rgl/c2ba64b7e2a5a04d1eb65983995dce76 |
import {PipeTransform, Pipe} from 'angular2/core'; | |
@Pipe({ name: 'highlight' }) | |
export class HighLightPipe implements PipeTransform { | |
transform(text: string, [search]): string { | |
return search ? text.replace(new RegExp(search, 'i'), `<span class="highlight">${search}</span>`) : text; | |
} | |
} | |
/** Usage: |
let searchRoot = ReactDom.render(React.createElement(Main), document.getElementById('main')); | |
try { | |
var getComponent = (comp) => comp._renderedComponent ? getComponent(comp._renderedComponent) : comp; | |
var getComponentById = (id)=> { | |
var comp = searchRoot._reactInternalInstance; | |
var path = id.substr(1).split('.').map(a=> '.' + a); | |
if (comp._rootNodeID !== path.shift()) throw 'Unknown root'; | |
while (path.length > 0) { | |
comp = getComponent(comp)._renderedChildren[path.shift()]; |
$ npm install --save babel-cli babel-preset-es2015
$ npm install --save-dev jasmine
.babelrc:
{
"presets": ["es2015"]