Skip to content

Instantly share code, notes, and snippets.

View jonasbn's full-sized avatar
🤚
keeping my distance

Jonas Brømsø jonasbn

🤚
keeping my distance
View GitHub Profile
#!/usr/bin/env perl
# Copyright 2015 by David Golden
# Licensed under CC0 https://creativecommons.org/publicdomain/zero/1.0/
# Updated 2016-03-01:
# - more variation in organzations selected; you will want to customize this yourself
# - splits out wishlists differently/correctly
# - reports only PRs unless --all is specified
use v5.10;
use strict;
use warnings;
@joshenders
joshenders / smokeping.sh
Last active July 26, 2022 18:43
Poor man's smokeping for OS X
#!/bin/bash
# https://gist.github.com/joshenders/52cb78bedaea6787faac
# This script uses the BSD variants of commands and is intended to
# be run on an unmodified installation of OSX.
pmset noidle &
now=$(date +%s)
duration=$((86400*3)) # 3days
@v1m
v1m / .curlrc
Last active March 29, 2024 13:11
sample .curlrc file
# this is a sample .curlrc file
# https://everything.curl.dev/ is a GREAT RESOURCE
# store the trace in curl_trace.txt file. beware that multiple executions of the curl command will overwrite this file
--trace curl_trace.txt
# store the header info in curl_headers.txt file. beware that multiple executions of the curl command will overwrite this file
--dump-header curl_headers.txt
#change the below referrer URL or comment it out entirely
@Zenexer
Zenexer / Mac Keyboard Symbols.md
Last active May 4, 2024 02:14
List of Mac/Apple keyboard symbols
@oneohthree
oneohthree / quick-slugify.sh
Last active February 22, 2024 01:53
Quick bash slugify
echo "$STRING" | iconv -t ascii//TRANSLIT | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z
@blueyed
blueyed / xterm-bg.sh
Last active March 19, 2024 01:02
Query background setting from terminal (xterm / rxvt-unicode)
#!/bin/sh
#
# Query a property from the terminal, e.g. background color.
#
# XTerm Operating System Commands
# "ESC ] Ps;Pt ST"
oldstty=$(stty -g)
# What to query?
@xero
xero / irc.md
Last active May 3, 2024 23:19
irc cheat sheet

IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
  • Leaves the specified channel.

Git Cheat Sheet

Commands

Getting Started

git init

or

@jiaaro
jiaaro / hotkey_helpers.js
Last active February 27, 2023 22:01
Mac Automation – Javascript (JSX) Hotkey helpers
// How to use:
// 1. Open "Script Editor" (requires OS X 10.10 Yosemite)
// 2. Change the language from "AppleScript" to "JavaScript"
// 3. Paste the code below and replace the safari example.
//
// More info:
// https://developer.apple.com/library/mac/releasenotes/InterapplicationCommunication/RN-JavaScriptForAutomation/index.html
var sys_events = Application("System Events");
@emilsoman
emilsoman / tmux-layout.md
Created August 31, 2014 21:49
Easy tmux layouts for tmuxinator

Tmux layouts with tmuxinator

Finally this time, I'm sold on tmux after I used tmuxinator to configure tmux layouts. The default layout didn't work for me, I wanted more control on the split panes. Here's how you can fine tune your tmux layout:

  1. Add this to your ~/.tmux.conf -> set -g mouse-resize-pane on
  2. Start tmux, split panes, resize panes with mouse to your liking
  3. On your shell, run tmux list-windows to list active tmux windows and their layouts
  4. Copy paste the layout in tmuxinator project file