Skip to content

Instantly share code, notes, and snippets.

@hartym
hartym / git-stash-grep
Created May 3, 2012 09:45 — forked from netshade/gist:1125810
git stash grep (bash)
stashgrep() {
for i in `git stash list | awk -F ':' '{print $1}'`; do
git stash show -p $i | grep -H --label="$i" "$1"
done
}
@sarahhodne
sarahhodne / 01-travis-contributors.txt
Created December 3, 2012 22:20
List of the top contributors across the travis-ci organization's projects
svenfuchs: 5515 (#1)
joshk: 2234 (#2)
michaelklishin: 2206 (#3)
drogus: 1145 (#4)
rkh: 888 (#5)
roidrage: 674 (#6)
henrikhodne: 394 (#7)
sferik: 302 (#8)
ifesdjeen: 220 (#9)
randym: 192 (#10)
@XVilka
XVilka / TrueColour.md
Last active April 8, 2024 14:02
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@bobzoller
bobzoller / build_xvfb
Last active May 12, 2018 18:07
Compiles a static xvfb for the Heroku platform.
#!/bin/sh
#
# Compiles a static xvfb for the Heroku platform.
#
# This script is a conglomeration of:
# * https://github.com/ddollar/heroku-buildpack-apt
# * http://stackoverflow.com/questions/14845291/compile-static-linked-binary-of-xvfb
# * gumption
set -e # fail fast
@jomo
jomo / Minecraft Accounts.md
Last active April 16, 2024 21:57
Tracking down Minecraft account creation

Tracks down when a Minecraft account was created.

How it works

Mojang has an API endpoint for usernames:

https://api.mojang.com/users/profiles/minecraft/<name>?at=<timestamp>

It can be used to find the UUID of an account, by username it used at the given time.
It returns either 200 OK or 204 No Content – indicating that the username was not in use at the time.

@robertpainsi
robertpainsi / README.md
Last active March 21, 2024 10:45
How to reopen a pull-request after a force-push?

How to reopen a pull-request after a force-push?

Precodinitions

  • You need the rights to reopen pull requests on the repository.
  • The pull request hasn't been merged, just closed.

Instructions

  1. Write down the current commit hash of your PR-branch git log --oneline -1 <PR-BRANCH>
  2. Write down the latest commit hash on github before the PR has been closed.
  3. git push -f origin :
@kudaba
kudaba / gh_actions_crash.md
Created November 12, 2019 05:11
Github actions: How to capture a crash dump

If an application is crashing during a github actions run then you can use this guide to capture the core as an artifact for debugging.

This guide was developed to debug Mac crashes specifically. It should mostly apply to Linux as well but getting dumps from Windows is unknown for now.

Mac / Linux

By default these systems will not be in a state where they are recording core dumps, and even when enabled you need to run with elevated permissions for a core to even be written. To capture dumps you need to do the following:

@resilar
resilar / .zshrc
Last active August 22, 2021 23:57
Dynamic window title with zsh shell
# Dynamic window title with zsh shell.
# Shows current directory and running (multi-line) command.
case "$TERM" in (rxvt|rxvt-*|st|st-*|*xterm*|(dt|k|E)term)
local term_title () { print -n "\e]0;${(j: :q)@}\a" }
precmd () {
local DIR="$(print -P '[%c]%#')"
term_title "$DIR" "zsh"
}
preexec () {
local DIR="$(print -P '[%c]%#')"
@BlakeStevenson
BlakeStevenson / texas-dps.js
Last active May 2, 2024 21:47
Create an appointment at the Texas DPS at the closest location, soonest time, programatically.
const axios = require('axios');
async function getLocations() {
const locationsData = await axios.post("https://publicapi.txdpsscheduler.com/api/AvailableLocation", {
"TypeId": 71,
"ZipCode": "10001",
"CityName": "",
"PreferredDay": 0
});
return locationsData.data;
}
--- glibc-2.33/nptl/pthreadP.h 2022-01-02 23:37:20.000000000 -0500
+++ glibc-2.33-modified/nptl/pthreadP.h 2022-01-03 00:56:39.622447597 -0500
@@ -220,7 +220,7 @@
hidden_proto (__pthread_keys)
/* Number of threads running. */
-extern unsigned int __nptl_nthreads attribute_hidden;
+extern unsigned int __nptl_nthreads;
#ifndef __ASSUME_SET_ROBUST_LIST