I hereby claim:
- I am mendhak on github.
- I am mendhak (https://keybase.io/mendhak) on keybase.
- I have a public key whose fingerprint is 6989 CF77 4903 69CF FDCB CD89 95E7 D75C 76CB E9A9
To claim this, I am signing this object:
public static String GetUrl(String url) throws Exception | |
{ | |
URL serverAddress = null; | |
HttpURLConnection connection = null; | |
// OutputStreamWriter wr = null; | |
BufferedReader rd = null; | |
StringBuilder sb = null; | |
String line = null; | |
try |
#!/usr/bin/env python | |
""" | |
StarHScale a Horizontal slider that uses stars | |
Copyright (C) 2006 Mark Mruss <[email protected]> | |
This library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either |
public static T GetValue<T>(this DataRow row, string field) | |
{ | |
if (!row.Table.Columns.Contains(field)) | |
{ | |
return default(T); | |
} | |
else | |
{ | |
return (T)Convert.ChangeType(row[field].ToString(), typeof(T)); |
public static class DataRecordExtensions | |
{ | |
public static T GetValue<T>(this IDataRecord reader, string columnName) | |
{ | |
object columnValue = reader[columnName]; | |
T returnValue = default(T); | |
if (!(columnValue is DBNull)) | |
{ | |
returnValue = (T)Convert.ChangeType(columnValue, typeof(T)); | |
} |
sshfs [email protected]:/home/username /mnt/mountname -p 1234 -o allow_other -o IdentityFile=/home/mendhak/Documents/keys/id_rsa | |
import time | |
import socket | |
def collect_metric(name, value, timestamp): | |
sock = socket.socket() | |
sock.connect( ("localhost", 2003) ) | |
sock.send("%s %d %d\n" % (name, value, timestamp)) | |
sock.close() | |
def now(): | |
return int(time.time()) |
import os | |
import pytz | |
import sys | |
import datetime | |
import dateutil.parser | |
import boto | |
downloadFolder = "downloads" | |
if len(sys.argv) > 1: |
I hereby claim:
To claim this, I am signing this object:
package se.marteinn.ui; | |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import android.widget.ScrollView; | |
/** | |
* Triggers a event when scrolling reaches bottom. |
#Source: https://stackoverflow.com/questions/2241063/bash-script-to-setup-a-temporary-ssh-tunnel | |
#SSH feature - control sockets | |
ssh -4 -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa -M -S my-ctrl-socket -fnNT -L 10023:remoteserver.com:8000 [email protected] | |
#Get PID - you'll have to parse this | |
ssh -S my-ctrl-socket -O check [email protected] | |
#Exit | |
ssh -S my-ctrl-socket -O exit [email protected] |