Skip to content

Instantly share code, notes, and snippets.

palaniraja palaniraja

Block or report user

Report or block palaniraja

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@palaniraja
palaniraja / Internet-sharing-SLeo.scpt
Created Jan 30, 2011
Apple script to toggle internet sharing (via airport)
View Internet-sharing-SLeo.scpt
on run {input, parameters}
tell application "System Preferences"
activate
end tell
tell application "System Events"
tell process "System Preferences"
click menu item "Sharing" of menu "View" of menu bar 1
delay 0
View notification.js
var notification = window.webkitNotifications.createNotification("http://www.google.com/images/logos/ps_logo2.png", "Title", "Notification message goes here");
notification.show();
@palaniraja
palaniraja / HSBC.php
Created Jun 7, 2011
Class to process payment using HSBC gateway (HSBC CPI Payment)
View HSBC.php
<?php
/**
* @desc Class to process payment using HSBC gateway
* This class will return orderhash
* 18-Dec-2006
*/
class HSBC{
var $storeFrontId;
@palaniraja
palaniraja / randomImages.sh
Created Jun 15, 2011
Shell script to populate sample images for array of names
View randomImages.sh
#!/bin/bash
productIds=("5108401" "5108004" "5084002" "084003" "513802" "510724" "1083800" "31083" "313725" "5084224" "82759" "11735" "1104_2" "11268" "133" "11084_2" "114189" "1721" "143" "SA058" "0848_1" "540854" "140876" "34_4" "34068" "584397" "6296" "640008" "09T-IC" "653" "54086" "1903" "3315" "54587" "54527" "B23" "SOF43-TP" )
productImgs=( "productImage.png" "productImage-1.png" "productImage-2.png" "productImage-3.png" "productImage-4.png")
prodLen=${#productIds[@]} #productid array length
imgLen=${#productImgs[@]} #img array length
# use for loop to read all productids
@palaniraja
palaniraja / TestViewController.m
Created Jun 17, 2011
TestViewController to test TKAlertCenter issue with UIAlertView
View TestViewController.m
-(IBAction) testTapped:(id)sender{
[[TKAlertCenter defaultCenter] postAlertWithMessage:NSLocalizedString(@"Before an alert", nil)];
UIAlertView *av = [[UIAlertView alloc] initWithTitle:@"TEST" message:@"TEST MSG"
delegate:self cancelButtonTitle:@"cancel" otherButtonTitles:nil];
[av show];
[av release];
View manifest.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
View build-index.html
<!DOCTYPE html>
<html>
<head>
<title>My awesome app</title>
</head>
<body>
<h2>beta builds</h2>
<a href="itms-services://?action=download-manifest&amp;url=http://dl.dropbox.com/u/1001/manifest.plist">Awesome App v 0.0.16</a></body>
<h2>alpha builds</h2>
@palaniraja
palaniraja / smsme.scpt
Created Aug 19, 2011
Applescript to send SMS (text) message when it receive an email on my office outlook.
View smsme.scpt
(*
SMS me when new mail arrived.
Based on http://mattgemmell.com/using-growl-with-microsoft-outlook + SMS API from http://www.thekirankumar.com/blog/downloads/SMS-API2.0.zip
*)
-- Get a list of all "current messages" in Outlook.
tell application "Microsoft Outlook"
set theMessages to the current messages
end tell
@palaniraja
palaniraja / chrome-history.js
Created Sep 21, 2011
Google Chrome history link scrapping
View chrome-history.js
/*
Filter Google Chrome history by search and scrap the links :)
*/
var aTags = document.getElementsByTagName("a");
var n = aTags.length;
for(i=0; i<n; i++){
console.log(aTags[i].href);
}
@palaniraja
palaniraja / testflightsessionlog.js
Created Dec 15, 2011
Testflightapp Expand all session logs
View testflightsessionlog.js
var elem = document.getElementsByClassName('session_log');
for (i=0;i<elem.length;i++){
elem[i].style.display="";
}
You can’t perform that action at this time.