Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block henrik242

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ErikAugust / spectre.c
Last active Jul 9, 2019
Spectre example code
View spectre.c
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#include <x86intrin.h> /* for rdtscp and clflush */
kurtschlatzer /
Last active Jul 14, 2019 — forked from ejdyksen/
Fix EDID problems on external monitors in Mac OS.
pwnsdx /
Last active Jul 18, 2019
Disable bunch of #$!@ in Sierra (Version 2.1)
# IMPORTANT: You will need to disable SIP aka Rootless in order to fully execute this script, you can reenable it after.
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
# Agents to disable
TODISABLE=('' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '
View wtf.js
/* VT100 terminal reset (<ESC>c) */
/* numbers comparations */
> '2' == 2
> '2' === 2
nmz787 / each_cell_on_its_own_line
Last active Apr 3, 2019
View each_cell_on_its_own_line
import xlrd
import sys
if __name__ == '__main__':
if len(sys.argv) != 2:
print "Usage: git-xlsx-textconv file.xslx"
excelFileName = sys.argv[1]
xlFile = xlrd.open_workbook(excelFileName)
niksumeiko / git.migrate
Last active Jul 19, 2019
Moving git repository and all its branches, tags to a new remote repository keeping commits history
View git.migrate
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
nolanlawson /
Last active Feb 9, 2019
Gradle tab completion for Bash. Works on both Mac and Linux.

Gradle tab completion script for Bash

A tab completion script that works for Bash. Relies on the BSD md5 command on Mac and md5sum on Linux, so as long as you have one of those two commands, this should work.


$ gradle [TAB]
sgr /
Last active Feb 15, 2018
When "" exhausts CPU resources on Mac OSX mavericks (10.9), you can try following workaround.
mkdir ${TMPDIR}/
4ndrej /
Created Jan 16, 2013
Test of java SSL / keystore / cert setup. Check the commet #1 for howto.
/** Establish a SSL connection to a host and port, writes a byte and
* prints the response. See
public class SSLPoke {
public static void main(String[] args) {
lonnen / gist:3101795
Created Jul 12, 2012
git grep and git blame. two great tastes that taste great together
View gist:3101795
# from i8ramin -
# runs git grep on a pattern, and then uses git blame to who did it
ggb() {
git grep -n $1 | while IFS=: read i j k; do git blame -L $j,$j $i | cat; done
# small modification for git egrep bash
geb() {
git grep -E -n $1 | while IFS=: read i j k; do git blame -L $j,$j $i | cat; done
You can’t perform that action at this time.