Skip to content

Instantly share code, notes, and snippets.

View mayrund's full-sized avatar

May run mayrund

View GitHub Profile
mkdir projectName
cd projectName
virtualenv --no-site-package venv
pip install flask
touch app.py
mkdir static
mkdir templates
@mayrund
mayrund / windows_must_have_apps
Last active November 17, 2015 10:14
# windows must have apps #
# Generic
* Beyond Compare
* grepWin - find and replace tool
* BareTail - A free real-time log file monitoring tool
* TreeSize Free - Quickly Scan Directory Sizes and Find Space Hogs
* Lockhunter - release locked files
* CDBurnerXP - burn cd/dvd and create iso files
* VirtualCloneDrive - mount iso files
* WinRAR / 7zip
@mayrund
mayrund / KB2468871
Created December 8, 2015 15:21
Microsoft.Bcl.Async not being able to resolve System.Core version 2.0.5.0.
Please install KB2468871, which solves the issue related to Microsoft.Bcl.Async not being able to resolve System.Core version 2.0.5.0.
See also Issue 8 in the async targeting pack knowledge base.
Here are the direct download links for the fixes, for the x86 and x64 environments:
http://download.microsoft.com/download/2/B/F/2BF4D7D1-E781-4EE0-9E4F-FDD44A2F8934/NDP40-KB2468871-v2-x86.exe
http://download.microsoft.com/download/2/B/F/2BF4D7D1-E781-4EE0-9E4F-FDD44A2F8934/NDP40-KB2468871-v2-x64.exe
@mayrund
mayrund / check network speed
Last active December 26, 2015 01:48
Check network speed against cachefly without writing data to physical drive.
linux: wget http://cachefly.cachefly.net/100mb.test -O /dev/null
osx: curl -L -o /dev/null http://cachefly.cachefly.net/100mb.test $ dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
@mayrund
mayrund / uninstall_windows_service.vbs
Created June 8, 2016 12:20
Uninstall Windows Service VBScript
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colListOfServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where Name = 'Name_Of_Service_You_Want_To_Uninstall_Here'")
For Each objService in colListOfServices
objService.StopService()
objService.Delete()
@mayrund
mayrund / firebird_sql_add_user.txt
Created September 28, 2016 11:57
Firebird SQL Add User
1. gsec -user SYSDBA -password masterkey
2. add test -pw test -fname Test -lname Account
3. exit
4. login with user test & password test
RESTORE HEADERONLY FROM DISK = 'D:\dbbackup\iMISMain15_15.2.5.3815.bak'
@mayrund
mayrund / C#_CaptureHTTP_request
Created November 9, 2016 13:47
Capture HTTP request
private string GetRequest()
{
var headers = String.Empty;
StringBuilder sb = new StringBuilder();
sb.AppendLine("URL: " + Context.Request.Url);
sb.AppendLine("IP address:" + Context.Request.UserHostAddress);
sb.AppendLine("HttpMethod " + Request.HttpMethod);
sb.AppendLine("Header:");
foreach (var key in Request.Headers.AllKeys)
sb.AppendLine(key + "=" + Request.Headers[key]);
@mayrund
mayrund / getPortByProcessName.bat
Last active November 19, 2016 19:58
Windows Get Port by Process Name
for /f "tokens=2 delims=," %F in ('tasklist /nh /fi "imagename eq sqlservr.exe" /fo csv') do netstat -oan | findstr %~F
(Note: Please replace % with %% when running in Batch file instead of Command Line)
@mayrund
mayrund / locale_fix.sh
Created July 29, 2017 15:39
Armbian fix locale problem
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8