From the "Ruby SDK + Gems" click + and select "Version Manager"
hit cmd+shift+. so Finder shows all directories (otherwise /opt may not be visible).
Navigate to /opt/homebrew/share/chruby/, select the chruby.sh file and click "OK"
You should now be able to select a chruby rubies from the window
This file contains 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
<?php | |
class Customer | |
{ | |
private $id; | |
private $fields; | |
public function __construct() | |
{ | |
$this->id = null; |
This file contains 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 'faker' | |
require 'net/http' | |
require 'json' | |
# static data | |
def createFakeData() | |
api_entry = "<Your API Entry>" | |
# Fake data |
Recode video screen size 1366x768, rate 25, audio input by default, Output video call output.mkv
ffmpeg -video_size 1366x768 -framerate 25 -f x11grab -i :0.0 -f pulse -ac 2 -i default output.mkv
This file contains 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
finder(){ | |
du -a $1 | awk '{print $2}' | fzf | xargs -r $EDITOR | |
} | |
# Usage: | |
# finder {folder} | |
# eg: finder .config |
This file contains 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 Lock = Caps_Lock | |
keysym Escape = Caps_Lock | |
keysym Caps_Lock = Escape | |
add Lock = Caps_Lock | |
# usage | |
# xmodmap ~/.swapper |
let say you are doing web development:
<a href="www.google.com">link</a>
we want to change the google link to github link. we use h j k l move to href, and then press "v" to select the google link, press "c" to change it to 'www.github.com" Instead, we can just type below at the line any position
c i "
This file contains 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
import {createStore} from 'redux'; | |
// STORE -> GLOBALIZED STATE | |
// ACTION | |
// like restaurant menu | |
const increment = () => { | |
return { | |
type: 'INCREMENT' | |
} |
This file contains 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
exports.validateRegister = async (ctx, next) => { | |
const data = ctx.req.body; | |
const e = (data) => !!data.email && isEmail(data.email); | |
const p = (data) => !!data.password; | |
const n = (data) => !!data.name; | |
const checks = [e, p, n]; | |
const isPass = (check) => check(data); |
NewerOlder