Skip to content

Instantly share code, notes, and snippets.

Nick Parker developernotes

View GitHub Profile
@developernotes
developernotes / brew-list-dependencies.rb
Created Apr 30, 2015
List installed homebrew packages and their dependencies
View brew-list-dependencies.rb
require 'utils'
class ListDependencies
def run
@command = <<-EOT
brew list | while read cask; do
printf "\e[1;34m%s ->\e[1;37m" "$cask";
brew deps $cask | awk '{printf(" %s ", $0)}'; echo "";
done
View keybase.md

Keybase proof

I hereby claim:

  • I am developernotes on github.
  • I am developernotes (https://keybase.io/developernotes) on keybase.
  • I have a public key whose fingerprint is 61DE BD73 2F3F 0777 1269 972E 2F87 3048 08D4 0CEC

To claim this, I am signing this object:

@developernotes
developernotes / SampleTest.java
Created Nov 13, 2013
Sample test for opening a SQLCipher 3.0.0 database for the SQLCipher mailing list.
View SampleTest.java
package net.zetetic.tests;
import android.util.Log;
import net.sqlcipher.Cursor;
import net.sqlcipher.database.SQLiteDatabase;
import net.zetetic.ZeteticApplication;
import java.io.File;
import java.io.IOException;
View simple-org-to-csv.el
(defun string-replace (old-value new-value source)
"replace old-value with new-value from source"
(with-temp-buffer
(insert source)
(goto-char (point-min))
(while (search-forward old-value nil t)
(replace-match new-value nil t))
(buffer-substring (point-min) (point-max))))
(defun org-export-to-csv (file)
@developernotes
developernotes / DemoViewController.cs
Created Apr 4, 2013
Full text search example with SQLCipher for Xamarin.iOS
View DemoViewController.cs
using System;
using System.Drawing;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using System.IO;
using Mono.Data.Sqlcipher;
namespace Demo
View gist:4643116
["1", "2", "3", "4", "5"].map(function(x, y, z){return parseInt(x)})
@developernotes
developernotes / sqlcipher.php
Created Nov 21, 2012
Dump the SQLCipher version in PHP
View sqlcipher.php
<?php
try {
$db = new SQLite3("demo.db");
$version = $db->query("PRAGMA cipher_version");
if($version){
var_dump($version->fetchArray());
} else {
throw new Exception($db->lastErrorMsg());
}
@developernotes
developernotes / gist:3723995
Created Sep 14, 2012
OracleDataReader ctor
View gist:3723995
// Oracle.DataAccess.Client.OracleDataReader
private IntPtr m_pColumnsDataBuffer = IntPtr.Zero;
private object m_disposeSyncObj = new object();
internal unsafe OracleDataReader(OracleConnection connection, IntPtr[] opsSqlCtx, IntPtr opsDacCtx, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, OpoDacValCtx* pOpoDacValCtx, MetaData metaData, int resultCount, CommandBehavior commandBehavior, Hashtable safeMapping, string commandText, int freeOpsSqlCtx, bool bFetchSizePropertySet)
{
int num = 0;
this.m_bBOF = true;
this.m_external = true;
this.m_safeMapping = safeMapping;
this.m_bFetchSizePropertySet = bFetchSizePropertySet;
@developernotes
developernotes / changelog.sh
Created Jul 5, 2012
Display a simple changelog between the last two tags in a Git repository
View changelog.sh
#! /usr/bin/env sh
firstTag=$(git tag | sort -r | head -1)
secondTag=$(git tag | sort -r | head -2 | awk '{split($0, tags, "\n")} END {print tags[1]}')
echo "Changes between ${secondTag} and ${firstTag}\n"
git log --pretty=format:' * %s' ${secondTag}..${firstTag}
@developernotes
developernotes / proguard.cfg
Created Jul 3, 2012
ProGuard with SQLCipher for Android
View proguard.cfg
-libraryjars libs/commons-codec.jar
-libraryjars libs/guava-r09.jar
-libraryjars libs/sqlcipher.jar
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-dontpreverify
-dontobfuscate
You can’t perform that action at this time.