Skip to content

Instantly share code, notes, and snippets.

View tonidy's full-sized avatar

toni dy tonidy

View GitHub Profile
/**
* CobaRobot.java
* @author Enrico Budianto
* link enricobudianto.wordpress.com/2009/06/23/membuat-mouse-wiggle-sendiri-dengan-java
*/
import java.awt.Robot;
import java.awt.AWTException;
public class CobaRobot{

Drag from an existing node to add a new node or link. Click to select/deselect nodes/links. Hit the DELETE key to remove the selected node or link. Drag to pan. Scroll to zoom.

Built with D3.js.

@tonidy
tonidy / tes.ini
Created March 3, 2013 11:25
tes doang
tes
aja
@tonidy
tonidy / p2u
Created March 31, 2013 14:00
p2u is small script which convert windows path to unix path. It may useful in msys app when environment variable (contain path) set in Windows path.
# put this in .bashrc/.bash_profile file
# the idea is taken from http://stackoverflow.com/a/13701495
# function to convert windows path to unix path
# USAGE: p2u $WINDOWS_PATH
p2u() {
local winpath=$1
echo "/$winpath" | sed 's/\\/\//g' | sed 's/://'
}
@tonidy
tonidy / gist:5531390
Created May 7, 2013 09:26
Clean database in SQL Server
-- The scripts are taken from http://stackoverflow.com/a/8150428
declare @n char(1)
set @n = char(10)
declare @stmt nvarchar(max)
-- procedures
select @stmt = isnull( @stmt + @n, '' ) +
'drop procedure [' + schema_name(schema_id) + '].[' + name + ']'
@tonidy
tonidy / manifest.xml
Last active December 17, 2015 18:59
WPI Packages sample
<msdeploy.iisApp>
<iisApp path="Application1" />
<runCommand MSDeploy.MSDeployKeyAttributeName="path" waitInterval="60000" waitAttempts="10"
MSDeploy.MSDeployProviderOptions="H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcplVmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/In6NX/PX+DV+jf/7//6//2/8xP9+o1/r1/g1fo3vfVFM66qpztvxVT4Zz/JVWV0v8mU7Sn8yr5uiWn72YLw73hnvjNKTddmu6/yzZb5u66wcpS/Xk7KY/l759Zvqbb787N7u5Pzewf1Ps9m9T/fze/d/XfS05zr4LnXw1Hbg/fqyri6LWV5/uWqpw+bX+TV+jV/jN1rpZy+yRf7rrLJ2/usus0Xe/HqXWbnOm1/z1/z1fj2g/+v92r/Gr/FrJPV6eVItFtly9uvh3d/r5NHv+91iOauumt/39XXT5ot7e7/vtJnWxaod5+/ylL5/zX81v+/pMpuU+fFqRQPJ0PvLqirb6t7ek6IdX06aH/t1f41f49f4sV/v1/g1fo3fHL/hf785/sL/fsP/B95IjT9TAQAA"
path="C:\Windows\System32\cscript.exe C:\Scripts\EnableApplicationPoolto32Bit.vbs"/>
</msdeploy.iisApp>
@tonidy
tonidy / wget.vbs
Created June 18, 2013 06:35 — forked from udawtr/wget.vbs
'wget.vbs - similar to wget but written in vbscript
'based on a script by Chrissy LeMaire
' Usage
if WScript.Arguments.Count < 1 then
MsgBox "Usage: wget.vbs <url> (file)"
WScript.Quit
end if
' Arguments
# stolen from:
# http://lostechies.com/keithdahlby/2011/08/13/allowing-a-windows-service-to-interact-with-desktop-without-localsystem/
#
# NOTE: Be sure to run as Admin and restart to take effect.
$svcName = Get-Service -DisplayName *jenkins* | select -Exp Name
$svcKey = Get-Item HKLM:\SYSTEM\CurrentControlSet\Services\$svcName
# Set 9th bit, from http://www.codeproject.com/KB/install/cswindowsservicedesktop.aspx
$newType = $svcKey.GetValue('Type') -bor 0x100