Skip to content

Instantly share code, notes, and snippets.

View dandv's full-sized avatar
🔍
Consulting for Anthropic

Dan Dascalescu dandv

🔍
Consulting for Anthropic
View GitHub Profile
@dandv
dandv / gist:29323
Created November 26, 2008 08:35
Syntax highlight still doesn't work
#! perl -w
use strict;
my $content = '=toc<br />
=toc 2-4<br />
<p>=toc 2</p>
<div id="stff">=toc -3<br />
<p>=toc 2-</p>
';
#!/usr/local/bin/python
import string, sys
# If no arguments were given, print a helpful message
if len(sys.argv)==1:
print 'Usage: celsius temp1 temp2 ...'
sys.exit(0)
# Loop over the arguments
use strict;
my $content = '=toc<br />
=toc 2-4<br />
<p>=toc 2</p>
<div id="stff">=toc -3<br />
<p>=toc 2-</p>
';
my ($toc_h_min, $toc_h_max);
#!/bin/bash -e
# Neil Williams, reddit
# Configuration
REDDITUSER=reddit
REDDITHOME=/home/reddit
GITREPO=git://github.com/reddit/reddit.git
APTITUDE_OPTIONS="-y" # limit bandwidth: -o Acquire::http::Dl-Limit=100"
# make sure we're running as root
@dandv
dandv / bug.html
Created October 22, 2012 03:26
Reveal.JS: with controls removed, simply adding a control with the proper class names doesn't display it
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>reveal.js - The HTML Presentation Framework</title>
<meta name="description" content="A framework for easily creating beautiful presentations using HTML">
<meta name="author" content="Hakim El Hattab">
@dandv
dandv / gist:3946380
Created October 24, 2012 14:28
ready() doesn't fire unless there's a markdown section?
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>reveal.js - The HTML Presentation Framework</title>
<meta name="description" content="A framework for easily creating beautiful presentations using HTML">
<meta name="author" content="Hakim El Hattab">
@dandv
dandv / Reveal.js bug 202
Created October 25, 2012 01:55
Slides don't load on Android 2.3 if the highlight plugin isn't loaded
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>5reveal.js - The HTML Presentation Framework</title>
<meta name="description" content="A framework for easily creating beautiful presentations using HTML">
<meta name="author" content="Hakim El Hattab">
@dandv
dandv / gist:5563145
Created May 12, 2013 10:52
Why is it so cumbersome to do really simple things in node, like reading records from a file one by one? In Perl, C, PHP, Java, whatever, you'd just run: while ( record = file.fetch() ) { /* do stuff with record */ }
/*jslint node: true*/
'use strict';
var fs = require('fs');
var csv = require('csv');
var async = require('async');
// note, io.listen(<port>) will create a http server for you
//var io = require('socket.io').listen(8901);
//io.sockets.on('connection', function (socket) {
@dandv
dandv / search
Last active August 29, 2015 14:12
GGRC API response samples
@dandv
dandv / api-controls-18.json
Last active August 29, 2015 14:12
GGRC API response samples
{
"control": {
"company_control": false,
"people": [
{
"context_id": null,
"href": "/api/people/5",
"type": "Person",
"id": 5
}