Skip to content

Instantly share code, notes, and snippets.

View infynyxx's full-sized avatar
🫐

Prajwal Tuladhar infynyxx

🫐
View GitHub Profile
@infynyxx
infynyxx / sailthru_email_api.cs
Created February 14, 2012 15:35
Making Email API call with C# client
string apiKey = "***************";
string secret = "***************";
SailthruClient client = new SailthruClient(apiKey, secret);
SailthruResponse response;
EmailRequest emailRequest = new EmailRequest();
emailRequest.email = "praj@sailthru.com";
Hashtable fieldsVar = new Hashtable();
fieldsVar.Add("name", "prajwal tuladhar");
fieldsVar.Add("state", "NY");
@infynyxx
infynyxx / supreesion_benchmark.php
Created February 8, 2012 20:27
PHP speed – empty VS isset VS === with error suppression
<?
$myvar = array();
$times = 1000000;
$start = microtime(true);
for($x=0;$x<$times;$x++){
if( @$myvar['test'] === null ) { }
@infynyxx
infynyxx / ace_build_error
Created January 23, 2012 15:37
ace build error
praj-mba:ace praj$ ./Makefile.dryice.js normal
# ace ---------
copy.source.commonjs is deprecated, pass { project:... includes:...} directly as a source
Failed to find module: ../../../../../lib/fixoldbrowsers
Failed to find module: ../../../../../lib/dom
Failed to find module: ../../../../../lib/event
Failed to find module: ../../../../../editor
Failed to find module: ../../../../../edit_session
Failed to find module: ../../../../../undomanager
Failed to find module: ../../../../../virtual_renderer
@infynyxx
infynyxx / raw.mime
Created August 5, 2011 16:59
raw_email
MIME-Version: 1.0
Received: by 10.216.197.17 with HTTP; Fri, 5 Aug 2011 09:56:44 -0700 (PDT)
Date: Fri, 5 Aug 2011 12:56:44 -0400
Delivered-To: sales@xyz.com
Message-ID: <CAH4KJn-mu2HD3q+uHNm84a668q=HcejOZP=G9cbmwTDzMch5mg@mail.gmail.com>
Subject: Query regarding your awesome product: XYZ
From: Prajwal Tuladhar <praj@infynyxx.com>
To: XYZ Sales <sales@xyz.com>
Content-Type: multipart/alternative; boundary=000e0cd4c1e87507a304a9c4fbdb
@infynyxx
infynyxx / horizon.js
Created June 3, 2011 18:38
horizon.js
(function() {
var a;
var b = function(c, d) {
return function() {
return c.apply(d, arguments)
}
};
window.Sailthru = window.sailthru = a = (function() {
var f, e, g, d;
@infynyxx
infynyxx / sailthru_client_usage.rb
Created April 27, 2011 01:45
Sailthru gem usage
require 'rubygems'
require 'date'
require 'json'
require 'sailthru'
api_key = "api_key"
api_secret = 'secret'
api_url = "https://api.sailthru.coma"
sailthru = Sailthru::SailthruClient.new(api_key, api_secret, api_url)
#!/bin/bash
# Copyright 2010 Eric Ryan Harrison <me@ericharrison.info>
# Inspired by:
# http://daniel.haxx.se/blog/2010/12/14/add-latency-to-localhost/
if [ -n "$1" ]
then
if [ "$1" = "off" ]
then
tc qdisc del dev lo root
<html>
<head>
<title>Wifi Detection</title>
<script>
//http://infynyxx.com/misc/connection_detection.html
window.onload = function() {
if (navigator.connection) {
var connection_mapper = {}, conn = navigator.connection;
connection_mapper[conn.UNKNOWN] = "Unknown Connection";
connection_mapper[conn.CELL_2G] = "2G connection";
@infynyxx
infynyxx / mongo_args
Created August 16, 2010 18:30
init.d script for MongoDB
MONGO_OPTS="--quiet --pairwith 192.168.1.6 --arbiter 192.168.1.5"
@infynyxx
infynyxx / html5_slides.html
Created July 13, 2010 17:28
Presentation Slides in HTML 5
<!DOCTYPE html>
<!--
Copyright 2010 Google Inc.
All rights reserved.
Original slides:
Marcin Wichary
Modifications:
Ernest Delgado
Alex Russell