Skip to content

Instantly share code, notes, and snippets.

View tonidy's full-sized avatar

toni dy tonidy

View GitHub Profile
# 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
@echo off
rem
rem ****************************************************************************
rem
rem Copyright (c) Microsoft Corporation. All rights reserved.
rem This code is licensed under the Microsoft Public License.
rem THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
rem ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
rem IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
rem PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
me@ubuntu:/opt/blu/meshblu/node_modules/mosca/node_modules/zmq$ node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@2.0.2
gyp info using node@0.12.7 | linux | x64
gyp info spawn python2
gyp info spawn args [ '/usr/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
@tonidy
tonidy / gist:8f28dd0b4c6eb204ea5b
Last active August 31, 2015 09:31
kambing.sources.list
#deb http://kambing.ui.ac.id/ubuntu/ trusty main restricted universe multiverse
#deb http://kambing.ui.ac.id/ubuntu/ trusty-updates main restricted universe multiverse
#deb http://kambing.ui.ac.id/ubuntu/ trusty-security main restricted universe multiverse
#deb http://kambing.ui.ac.id/ubuntu/ trusty-backports main restricted universe multiverse
#deb http://kambing.ui.ac.id/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://dl2.foss-id.web.id/ubuntu/ trusty main restricted universe multiverse
deb http://dl2.foss-id.web.id/ubuntu/ trusty-updates main restricted universe multiverse
deb http://dl2.foss-id.web.id/ubuntu/ trusty-security main restricted universe multiverse
deb http://dl2.foss-id.web.id/ubuntu/ trusty-backports main restricted universe multiverse
@tonidy
tonidy / 0_reuse_code.js
Last active September 17, 2015 13:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@tonidy
tonidy / make-yt-custom.sh
Last active September 18, 2015 10:27
make-yt-custom.sh
#!/bin/bash
echo
java -version
update-alternatives --display java
javac -version
update-alternatives --display javac
echo
@tonidy
tonidy / make-youtrack.sh
Last active September 18, 2015 11:26 — forked from artzub/make.sh
Install JetBrains Hub + YouTrack + Nginx
#!/bin/bash
apt-get install mc htop git unzip wget curl aria2c -y
echo
echo "====================================================="
echo " WELCOME"
echo "====================================================="
echo
echo "Hub"
@tonidy
tonidy / create-db-socialengine.sql
Created June 14, 2011 11:27
The code is used to created database socialengine in MySQL command line mode (windows).
mysql> CREATE DATABASE socialengine;
mysql> GRANT ALL PRIVILEGES ON socialengine.* TO "seuser"@"localhost" IDENTIFIED BY "yourpassword";
mysql> FLUSH PRIVILEGES;
mysql> EXIT
@tonidy
tonidy / gist:1082390
Created July 14, 2011 12:55
T-SQL script to list database files and filesizes
--***** Define Variables *****
declare @GB float
declare @MB float
declare @KB float
declare @B float
--***** Assign Variable Values *****
set @GB = (cast(8192 as float) / cast(1073741824 as float))
set @MB = (cast(8192 as float) / cast(1048576 as float))
set @KB = (cast(8192 as float) / cast(1024 as float))
@tonidy
tonidy / gist:1391498
Created November 24, 2011 14:47
T-SQL to find a text in stored procedure
--kode#1
SELECT OBJECT_NAME(id)
FROM SYSCOMMENTS
WHERE [text] LIKE '%Foo%'
AND OBJECTPROPERTY(id, 'IsProcedure') = 1
GROUP BY OBJECT_NAME(id)
--kode#2
SELECT ROUTINE_NAME, ROUTINE_DEFINITION
FROM INFORMATION_SCHEMA.ROUTINES