Skip to content

Instantly share code, notes, and snippets.

View tonidy's full-sized avatar

toni dy tonidy

View GitHub Profile
@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 / ClearWindow.py
Created August 27, 2011 08:17
IDLE - an extension to clear the shell window
"""
Taken from: http://bugs.python.org/issue6143
Clear Window Extension
Version: 0.2
Author: Roger D. Serwy
roger.serwy@gmail.com
Date: 2009-06-14
@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
@tonidy
tonidy / frameworkDir32.reg
Created January 30, 2012 05:46
One way to fixing error in VS 2010 command prompt
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\SxS\VC7]
"9.0"="C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\"
"FrameworkDir32"="C:\\Windows\\Microsoft.NET\\Framework\\"
"10.0"="C:\\Program Files\\Microsoft Visual Studio 10.0\\VC\\"
"FrameworkVer32"="v4.0.30319"
@tonidy
tonidy / ScreenShots.cs
Created February 2, 2012 13:55
Capture screenshots of your app on your device
//
// Copyright (c) 2010-2011 Jeff Wilcox
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
@tonidy
tonidy / passwd.aspx
Created February 17, 2012 06:21
Recover password DNN
<%@ Page Language="C#" %>
<script runat="server">
void Page_Load(object sender, System.EventArgs e)
{
DotNetNuke.Entities.Users.UserInfo uInfo =
DotNetNuke.Entities.Users.UserController.GetUserById(0, 1);
if (uInfo != null)
{
string password =
@tonidy
tonidy / CentOS-Base.repo
Created April 19, 2012 05:46
CentOS-Base.repo with kambing.ui.ac.id repository
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
@tonidy
tonidy / gist:2873544
Created June 5, 2012 08:13
npm-debug.log when installed jitsu
info it worked if it ends with ok
verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
verbose cli 'install',
verbose cli '-g',
verbose cli 'jitsu' ]
info using npm@1.1.0-3
info using node@v0.6.10
verbose config file C:\Users\tonidy\.npmrc
verbose config file C:\Program Files\nodejs\etc\npmrc
@tonidy
tonidy / index.html
Created July 24, 2012 07:26
File untuk aplikasi HaloApp
<html>
<head>
<title>Aplikasi Halo Dunia</title>
</head>
<body>
<h1>Selamat datang di halo dunia.</h1>
</body>
</html>