Skip to content

Instantly share code, notes, and snippets.

/* gcc hi.c -o hi -lcrypto */
#include <stdlib.h>
#include <stdio.h>
#include <openssl/crypto.h>
int
main(int argc, char *argv[])
{
void *(*openssl_malloc)(size_t), (*openssl_free)(void *);
@ogrrd
ogrrd / dnsmasq OS X.md
Last active May 3, 2024 08:33
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install

@mperham
mperham / convert.rake
Created March 15, 2012 17:44
Ruby script to update MySQL from Latin1 to UTF8 without data conversion
desc "convert a latin1 database with utf8 data into proper utf8"
task :convert_to_utf8 => :environment do
puts Time.now
dryrun = ENV['DOIT'] != '1'
conn = ActiveRecord::Base.connection
if dryrun
def conn.run_sql(sql)
puts(sql)
end
else