Skip to content

Instantly share code, notes, and snippets.

@malisetti
malisetti / PhpSecLibDeployer.php
Created June 25, 2014 07:21
Phpseclib Deployer for Plum bundle
<?php
namespace My\Deployer;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of PhpSecLibDeployer
@malisetti
malisetti / NodeCCS.js
Created October 5, 2014 09:30
Google ccs server connection
var config = require('./gcmConfig');
var xmpp = require('node-xmpp');
var jobPayload;
var xmppClient;
var options = {
type: 'client',
jid: config.jid,
package com.your.package;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.database.DataSetObservable;
import android.os.AsyncTask;
import android.os.Build;
import android.text.TextUtils;
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- google's material design colours from
http://www.google.com/design/spec/style/color.html#color-ui-color-palette -->
<!--reds-->
<color name="md_red_50">#fde0dc</color>
<color name="md_red_100">#f9bdbb</color>
<color name="md_red_200">#f69988</color>
package com.aaplab.robird.util;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.ConnectivityManager;
import android.os.Handler;
import android.os.Looper;
<?php
namespace FTW\GuildBundle\Services;
/**
* Monitoring Gearman over telnet port 4730
*
* So the only way to monitor Gearman is via doing a telnet to port 4730. The
* current monitoring supported commands are fairly basic.
* There are plans to include more set of commands in the next release.

Telnet

The Gearman job server supports a text-based protocol to pull information and run some administrative tasks. The following commands are supported:

  • workers
  • status
  • maxqueue
  • shutdown
  • version
@malisetti
malisetti / PHP-Callable.php
Created September 10, 2015 16:26
writing code to sum things
<?php
function sum() {
$list = array();
$prepare = function($value) use(&$prepare, &$list) {
if (is_array($value)) {
return array_walk($value, $prepare, $list);
} else {
$list[] = $value;
}
@malisetti
malisetti / _snippet.html
Created November 18, 2015 05:14 — forked from elijahmanor/_snippet.html
Differences Between jQuery .bind() vs .live() vs .delegate() vs .on() Methods
<ul id="members" data-role="listview" data-filter="true">
<!-- ... more list items ... -->
<li>
<a href="detail.html?id=10">
<h3>John Resig</h3>
<p><strong>jQuery Core Lead</strong></p>
<p>Boston, United States</p>
</a>
</li>
<!-- ... more list items ... -->

Keybase proof

I hereby claim:

  • I am mseshachalam on github.
  • I am seshachalam (https://keybase.io/seshachalam) on keybase.
  • I have a public key whose fingerprint is 1EE7 642C 32F9 7505 52CA 00E5 48E1 A741 ABDD EFD4

To claim this, I am signing this object: