Skip to content

Instantly share code, notes, and snippets.

View tonidy's full-sized avatar

toni dy tonidy

View GitHub Profile
@udawtr
udawtr / wget.vbs
Last active March 23, 2023 04:47
wget.vbs - similar to wget but written in vbscript
'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
@wcharczuk
wcharczuk / RouteParser.cs
Created April 2, 2012 15:07
C# Route Parser
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Text.RegularExpressions;
//TODO: probably want to change this if you're using it your project
namespace ClothesHorse.Core
{
@dkordik
dkordik / Terminal.sublime-settings
Created May 2, 2012 15:36
Sublime Text 2 Terminal config with Console2/cygwin/bash to open a terminal in the current directory
{
"terminal": "C:/Program Files/Console2/Console.exe",
// In Console2 "Shell" section, have just "bash" with no args in a profile called "Terminal"
"parameters": ["-t", "Terminal", "-r", "/bin/xhere /bin/bash.exe", "`%CWD%`"]
}
@bsimser
bsimser / program.cs
Created May 26, 2012 02:19
.NET console app SignalR client
using System;
using SignalR.Client.Hubs;
namespace FANS.Demo
{
internal class Program
{
private static void Main(string[] args)
{
try
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 11, 2024 07:10
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@renyi
renyi / managers.py
Created August 18, 2012 07:34
Simple Geo model for Django
from geopy import units, distance
from mezzanine.core.managers import CurrentSiteManager
class GeoManager(CurrentSiteManager):
def near(self, latitude=None, longitude=None, distance_range=30):
queryset = super(GeoManager, self).get_query_set()
if not (latitude and longitude and distance_range):
return queryset.none()
@KevM
KevM / BootstrapService.cs
Created September 13, 2012 18:40
Example configuration of Topshelf to turn an console application into a Windows service
public class BootstrapService : ServiceControl
{
private readonly HostSettings _settings;
private Container _container;
private CaseMonitor _monitor;
public BootstrapService(HostSettings settings)
{
_settings = settings;
}
##################################################
#
##################################################
param(
[Parameter(Mandatory = $true)][String]$subscriptionId,
[Parameter(Mandatory = $true)][String]$storageAccountName,
[Parameter(Mandatory = $true)][String]$affinityGroupName,
[Parameter(Mandatory = $true)][String]$imageName = 'MSFT__Windows-Server-2012-Datacenter-201208.01-en.us-30GB.vhd',
[Parameter(Mandatory = $true)][String]$adminPassword,
@zippy1981
zippy1981 / ConEmuTasks.reg
Created November 3, 2012 00:34
ConEmu Tasks Registry File
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\ConEmu\.Vanilla\Tasks]
"Count"=dword:00000009
[HKEY_CURRENT_USER\Software\ConEmu\.Vanilla\Tasks\Task1]
"Name"="{PowerShell}"
"GuiArgs"="/single /Dir %userprofile%"
"Cmd1"="%SystemRoot%\\system32\\WindowsPowerShell\\v1.0\\powershell.exe"
"Active"=dword:00000000