Skip to content

Instantly share code, notes, and snippets.

View ruyrybeyro's full-sized avatar

Rui Ribeiro ruyrybeyro

View GitHub Profile
@trevnorris
trevnorris / perf-flame-graph-notes.md
Last active December 24, 2023 05:25
Quick steps of how to create a flame graph using perf

The prep-script.sh will setup the latest Node and install the latest perf version on your Linux box.

When you want to generate the flame graph, run the following (folder locations taken from install script):

sudo sysctl kernel.kptr_restrict=0
# May also have to do the following:
# (additional reading http://unix.stackexchange.com/questions/14227/do-i-need-root-admin-permissions-to-run-userspace-perf-tool-perf-events-ar )
sudo sysctl kernel.perf_event_paranoid=0
@ozaki-r
ozaki-r / dtrace-arm.patch
Last active January 3, 2016 23:29
Porting DTrace on NetBSD to ARM.
Index: external/cddl/osnet/dev/dtrace/arm/dtrace_asm.S
===================================================================
RCS file: /cvs/cvsroot/src/external/cddl/osnet/dev/dtrace/arm/dtrace_asm.S,v
retrieving revision 1.3
diff -u -r1.3 dtrace_asm.S
--- external/cddl/osnet/dev/dtrace/arm/dtrace_asm.S 5 Mar 2014 03:09:17 -0000 1.3
+++ external/cddl/osnet/dev/dtrace/arm/dtrace_asm.S 10 Mar 2014 05:47:33 -0000
@@ -203,13 +202,24 @@
void dtrace_invop_init(void)
*/
@acidprime
acidprime / genMachineCert.py
Created September 12, 2013 01:12
Generate a new CSR sing M$ CA services
#!/System/Library/Frameworks/Python.framework/Versions/2.6/bin/python
openssl = '/usr/bin/openssl'
curl = '/usr/bin/curl'
sed = '/usr/bin/sed'
kinit = '/usr/bin/kinit'
import urllib
import re
from subprocess import Popen, PIPE, STDOUT
## Get TGT via kinit - If 2k3, use password method if 2k8
@terminalfool
terminalfool / bind_config.pl
Created March 27, 2012 13:39
A BIND ad filter refresh script. Loads ad domains from adblock plus filters
#!/usr/bin/perl
use strict;
use Proc::Simple;
use Proc::Killall;
use Time::localtime;
use LWP::Simple qw($ua getstore);
$ua->agent("");
use Mozilla::CA;