Skip to content

Instantly share code, notes, and snippets.

View ranyitz's full-sized avatar

Ran Yitzhaki ranyitz

View GitHub Profile
@ranyitz
ranyitz / t.sh
Last active November 15, 2019 02:17
CLI equivalent to the `t` command in GitHub that opens the file finder
function t() {
FILES=($(rg --files --hidden --glob '!.git' | fzf --exit-0 --reverse --multi))
[[ $FILES ]] && code $FILES --folder-uri=$(git rev-parse --show-toplevel)
}
@ranyitz
ranyitz / editor-skins-data.json
Last active December 4, 2019 16:19
An example to editor-skins-data.json file
{
"wixui.skins.RichTextBox": {
"shd": {
"type": "BOX_SHADOW",
"defaultValue": "10px 10px 10px #CCCCCC",
"state": "regular"
},
"fnt": {
"type": "FONT",
"defaultValue": "font_8",
{
"wysiwyg.viewer.skins.button.AddProductButton": {
"react": [
[
"a",
"link",
[],
{},
[
"span",
@ranyitz
ranyitz / package.json
Last active March 10, 2020 11:44
yoshi release to fed ci release migration script
{
"name": "yoshi-release-to-fed-ci-release",
"version": "1.0.0",
"bin": "./yoshi-release-to-fed-ci-release.js"
}
@ranyitz
ranyitz / add-owner-to-specs.js
Last active June 25, 2020 15:15
Update owner in all specs
#!/usr/bin/env node
const fs = require('fs');
const os = require('os');
const path = require('path');
function writeJson(fileName, object) {
fs.writeFileSync(
fileName,
JSON.stringify(object, null, 2).replace(/\n/g, os.EOL) + os.EOL,
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ranyitz
ranyitz / gb.sh
Last active July 20, 2022 11:21
better git branch
alias gb="git for-each-ref --color=always --sort=-committerdate refs/heads/ --format=' %(color:green)%(committerdate:relative)%(color:reset)%09%(HEAD) %(color:yellow)%(refname:short)%(color:reset) %(color:magenta)%(authorname)%(color:reset) • %(contents:subject)'"
alias gbi="gb | fzf --ansi --header='checkout branch <choose branch>' --reverse | awk '{print $4}' | xargs git checkout"