Skip to content

Instantly share code, notes, and snippets.

View systemhalted's full-sized avatar
💭
I am just a DOS error!

Palak Mathur systemhalted

💭
I am just a DOS error!
View GitHub Profile
@systemhalted
systemhalted / fnPerformTasksOnUnload.html
Created June 26, 2012 09:50
Code Snippet for performing certain tasks on browser close event
<head>
<Title>fnPerformTasksOnUnload</Title>
<script>
function fnPerformTasksOnUnload(){
alert("Thanks for visiting us! Visit us again soon!");
}
</script>
@systemhalted
systemhalted / README.md
Created January 26, 2016 15:56 — forked from nicerobot/README.md
Mac OS X uninstall script for packaged install of node.js

To run this, you can try:

curl -ks https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh | bash

I haven't tested this script doing it this way but i run a lot of my Gists like this so maybe this one'll work too.

Alternatively,

curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh

chmod +x ./uninstall-node.sh

@systemhalted
systemhalted / InsertClob.java
Last active January 26, 2016 15:59
InsertClob
package in.palakmathur;
import java.sql.Clob;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.InitialContext;
@systemhalted
systemhalted / csv_monster.py
Created January 26, 2016 16:04 — forked from mrosata/csv_monster.py
Improved CSV File merger/File splitter that I created to help with large amounts of .csv work I've been doing.
"""Created by Michael Rosata
Python 2.7
Merge together .csv files. I'm creating this because I have 30 .csv files which need to be concatenated.
I also have many files which need to be split, so I've added splitting functionality to this as well.
"""
import csv
import sys
@systemhalted
systemhalted / gist:8b87ca3853b4492380e0
Last active March 9, 2016 22:32 — forked from tonymtz/gist:d75101d9bdf764c890ef
Uninstall nodejs from OSX Yosemite
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*

Keybase proof

I hereby claim:

  • I am palakmathur on github.
  • I am palakmathur (https://keybase.io/palakmathur) on keybase.
  • I have a public key whose fingerprint is D96D 488E 0DE1 4E80 D70D 0C63 A53E CE9E 59C1 F992

To claim this, I am signing this object:

var rainbowColor : String = "Blue"
rainbowColor = "Violet"
rainbowColor
Violet
val blackColor : String = "Black"
blackColor
val array = Array(5) {it * 2}
println(array.asList())
[0, 2, 4, 6, 8]
import kotlin.math.pow
val array = Array(7) { 1000.0.pow(it)}
val sizes = arrayOf("byte", "kilobyte", "megabyte", "gigabyte",
@systemhalted
systemhalted / scala.rb
Created June 21, 2018 03:00 — forked from fabiofumarola/scala.rb
Install Scala 2.10 RC3 on OSX
# to install the latest stable version:
brew install scala --with-docs
# to install scala-2.10.0-RC3:
brew install https://raw.github.com/gist/4118557/scala.rb --with-docs
# to switch versions (from https://github.com/mxcl/homebrew/wiki/External-Commands):
brew switch scala 2.9.2
brew switch scala 2.10.0-RC3
@systemhalted
systemhalted / gist:b752321e99cc6b3c20181758917e7c50
Created January 22, 2019 20:26 — forked from rednaxelafx/gist:925323
Correspondence between Sun/Oracle JDK, OpenJDK and HotSpot VM versions

Correspondence between Sun/Oracle JDK, OpenJDK and HotSpot VM versions

build date Sun/Oracle JDK Version OpenJDK Version HotSpot VM Version
2006-11-29 1.6.0-b105 1.6.0-b105
2007-03-14 1.6.0_01-b06 1.6.0_01-b06
2007-06-22 1.6.0_02-b05 1.6.0_02-b05
2007-09-24 1.6.0_03-b05 1.6.0_03-b05
2007-12-14 1.6.0_04-b12 10.0-b19