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
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
# ~/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 | |
} |
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
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 |
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
#!/usr/bin/env python3 | |
import os | |
import pyshark | |
dhcp_ports = [ | |
67, 68, # dhcp | |
546, 547, # dhcpv6 | |
] |
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
# Title here | |
# | |
# Use 50 characters maximum. | |
# Do not use a sentence-ending period. | |
# | |
# Prefixes: | |
# | |
# bump = bump version | |
# chore(subtype) = chore | |
# docs = documentation |
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 bash | |
function printDebug() { | |
if [ -z "${1}" ]; then | |
return 1 | |
fi | |
# That 2: | |
# FUNCNAME contains the printDebug call too and we want to ignore it. | |
if [[ ${#FUNCNAME[@]} -gt 2 ]]; then |
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
package main | |
import ( | |
"fmt" | |
"constraints" | |
) | |
func FoldlIter[T any, R any](init R, list (<- chan T), fold func(carry R, next T) R) R { | |
for value := range list { | |
init = fold(init, value) |