Skip to content

Instantly share code, notes, and snippets.

# Samples: 57 of event 'cpu-clock:uhpppH'
# Event count (approx.): 14250000
#
# Overhead Command Shared Object Symbol
# ........ .............. .................... ......................................................................................................................................................................................................
#
7.02% (redacted) ld-2.26.so [.] do_lookup_x
7.02% (redacted) libnss_files-2.26.so [.] internal_getent
5.26% (redacted) libresolv-2.26.so [.] __res_context_send
5.26% (redacted) (redacted) [.] (redacted)

Keybase proof

I hereby claim:

  • I am rahulg on github.
  • I am rahulg (https://keybase.io/rahulg) on keybase.
  • I have a public key ASDLgVek4iC5HG3gH9dHIu4KYfb5O8bdHYD6NMNT1eBwEQo

To claim this, I am signing this object:

def f():
l = []
def g(x):
l.append(x)
return l
return g
a = f()
b = f()
diff --git a/configure b/configure
index fdef550..7a7b2e4 100755
--- a/configure
+++ b/configure
@@ -1023,7 +1023,7 @@ then
if [ -n "$CFG_OSX_CLANG_VERSION" ]
then
case $CFG_OSX_CLANG_VERSION in
- (7.0* | 7.1* | 7.2* | 7.3*)
+ (7.0* | 7.1* | 7.2* | 7.3* | 8.0*)
diff --git a/libguile/stime.c b/libguile/stime.c
index f430ca4..8b810a7 100644
--- a/libguile/stime.c
+++ b/libguile/stime.c
@@ -834,6 +834,10 @@ scm_init_stime()
#ifdef HAVE_POSIX_CPUTIME
{
+#ifdef __APPLE__
+ if (clock_gettime (CLOCK_PROCESS_CPUTIME_ID, &posix_run_time_base) == 0)
@rahulg
rahulg / twitch-chat.py
Created June 6, 2016 08:47
Dump twitch chat replays
import datetime
import json
import re
import sys
import urllib.request
video_id = sys.argv[1]
try:
start_offset = int(sys.argv[1])
except (IndexError, ValueError):
@rahulg
rahulg / chmow
Created May 8, 2015 02:33
chmod / chown wrapper
#!/usr/bin/env bash
#
# Installation:
# Copy chmow to some directory in your path, like /usr/local/bin
# cd <directory_above>
# chmod 0755 chmow
# ln -s chmow chmod
# ln -s chmow chown
set -e -u
@rahulg
rahulg / rmbstatus.py
Last active August 29, 2015 14:16
Poll the Apple Store for shipping status of the 12" MacBook
#!/usr/bin/env python
# coding: utf-8
import json
import re
import sys
try:
import urllib.request as _urllib
except ImportError:
const int main = 0xC3C031;
@rahulg
rahulg / SetFont.java
Created July 12, 2013 15:53
Setting a custom typeface on Android.
TextView tv = (TextView) findViewById(R.id.someTextView);
Typeface tf = Typeface.createFromAsset(getAssets(), "fonts/fontname.otf");
tv.setTypeface(tf);