bind-key C-d split-window "pmenu"
# for horisontal split use
# bind-key C-d split-window -h "pmenu"`
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
import requests | |
import sys | |
def check(name, row): | |
if name is None: | |
return True | |
if name == row['country'].lower(): | |
return True | |
if name == row['countryInfo']['iso2'].lower(): |
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
class Thrift < Formula | |
desc "Framework for scalable cross-language services development" | |
homepage "https://thrift.apache.org/" | |
url "https://www.apache.org/dyn/closer.cgi?path=/thrift/0.11.0/thrift-0.11.0.tar.gz" | |
sha256 "c4ad38b6cb4a3498310d405a91fef37b9a8e79a50cd0968148ee2524d2fa60c2" | |
bottle do | |
cellar :any | |
sha256 "a26c4c6e39b346dc74c5d29ba271b9f64c537914eb3228e446e0ae2e34fa106b" => :mojave | |
sha256 "d1c648d84f21b567f1468625523b78d496d49954a3f5f28ce127f3eca7c0e2e4" => :high_sierra |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# ~/git-dirty.function.zsh | |
# This is a quick function and we don't want to load all the rc files with subshell | |
function git-is-dirty() { | |
if [[ "$(git status --porcelain)" == "" ]]; then | |
return 0 | |
else | |
return 1 | |
fi | |
} |
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
id_list = [123456789, 234567891, 345678912, 456789123, 567891234, 789123456, 891234567, 912345678] | |
packed = id_list.pack('L*') | |
string_list = id_list.map(&:to_s).join(' ') | |
puts "Packed version: #{packed.length} bytes long" | |
puts "Original:" | |
p id_list | |
puts "Bytes to send:" | |
p packed |
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
#!/usr/bin/env python3 | |
import requests | |
import argparse | |
import json | |
""" | |
Example usage: | |
# From file | |
$ breaches --filename my_account_list |
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
#!/usr/bin/env python3 | |
import os | |
from datetime import datetime | |
from multiprocessing import Pool | |
def is_image(x): | |
return x.endswith('.jpg') or x.endswith('.png') | |
def is_movie(x): |
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
// Single-Click Version: | |
// 1. Create a bookmark with: | |
javascript:document.body.addEventListener("click",function(t){for(var e=window.getSelection(),n=e.getRangeAt(0),o=e.anchorNode;0!=n.toString().indexOf(" ");)n.setStart(o,n.startOffset-1);n.setStart(o,n.startOffset+1);do{n.setEnd(o,n.endOffset+1)}while(-1==n.toString().indexOf(" ")&&""!=n.toString().trim()&&n.endOffset<o.length);n.toString().trim();e.focusNode.nodeValue=e.focusNode.nodeValue.replace(n.toString().trim(),"***")}); | |
// 2. Place your bookmark on your bookmarks bar | |
// 3. Push the button when you want to censor your name / anything else | |
// 4. Click on the word you want to hide | |
// Double-Click Version: | |
javascript:document.body.addEventListener("dblclick",function(t){for(var e=window.getSelection(),n=e.getRangeAt(0),o=e.anchorNode;0!=n.toString().indexOf(" ");)n.setStart(o,n.startOffset-1);n.setStart(o,n.startOffset+1);do{n.setEnd(o,n.endOffset+1)}while(-1==n.toString().indexOf(" ")&&""!=n.toString().trim()&&n.endOffset<o.length);n.toString().trim |
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
#!/bin/bash | |
days=${1:-1} | |
current_dir=$(pwd) | |
homebrew_prefix=$(brew --prefix) | |
for formula_dir in $(find ${homebrew_prefix}/Homebrew/Library/Taps -name "Formula" -type d); do | |
cd $formula_dir |