Skip to content

Instantly share code, notes, and snippets.

@steffes
steffes / keybase.md
Created October 28, 2017 17:36
keybase.md

Keybase proof

I hereby claim:

  • I am steffes on github.
  • I am steffes (https://keybase.io/steffes) on keybase.
  • I have a public key ASBIMqNKS3KPWkda1mXzbgcx5k-sipCXCkex_MdBE2YY9Ao

To claim this, I am signing this object:

@steffes
steffes / package.json
Created April 9, 2017 19:06
dependencies
"dependencies": {
"@angular/common": "~2.4.1",
"@angular/compiler": "~2.4.1",
"@angular/core": "~2.4.1",
"@angular/forms": "~2.4.1",
"@angular/http": "~2.4.1",
"@angular/platform-browser": "~2.4.1",
"@angular/platform-browser-dynamic": "~2.4.1",
"@angular/router": "~3.2.3",
"@angular/upgrade": "~2.4.1",
@steffes
steffes / fndata.js
Created May 12, 2015 19:31
datatables encoding
"aoColumnDefs": [
{
"fnRender": function ( o, val ) {
return String(val)
.replace(/&/g, '&')
.replace(/"/g, '"')
.replace(/'/g, ''')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;');
function createEnv(bindings,env) {
//return ["Env",bindings,env];
//return ["Env",bindings,["Env",env.push(bindings[0]),env.push(bindings[1])]];
return ["Env",bindings, updateGlobalEnvBindings(
env,
getBindingVariables(bindings),
getBindingValues(bindings)
)];
}
$value = null;
$mysqli->autocommit(FALSE);
$sql = "INSERT INTO temp (`fund_id`) VALUES (?)";
$stmt = $mysqli->prepare($sql);
$stmt->bind_param('i', $value);
foreach ($pdata as $key => $value) {
$stmt->execute();
}
$mysqli->commit();
@steffes
steffes / sqlsp.cs
Created January 20, 2015 03:16
MySql Stored Procedures
using System;
using System.Collections.Generic;
using System.Data;
using MySql.Data.MySqlClient;
using System.Configuration;
using System.ComponentModel;
[DataObject(true)]
public static class MessagesDB
{
(* Comments in Standard ML begin with (* and end with *). Comments can be
nested which means that all (* tags must end with a *) tag. This comment,
for example, contains two nested comments. *)
(* A Standard ML program consists of declarations, e.g. value declarations: *)
val rent = 1200
val phone_no = 5551337
val pi = 3.14159
val negative_number = ~15 (* Yeah, unary minus uses the 'tilde' symbol *)
@steffes
steffes / javascript_resources.md
Created August 4, 2014 20:59 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@steffes
steffes / gist:3915880
Created October 19, 2012 02:11
MopedRunner
/**
* Write a description of class MopedRunner here.
*
* @author (Alex Steffes & Hayden)
* @version (a version number or a date)
*/
import java.util.*;
import javax.swing.*;
@steffes
steffes / gist:3315422
Created August 10, 2012 16:36 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt