Skip to content

Instantly share code, notes, and snippets.

View mayrund's full-sized avatar

May run mayrund

View GitHub Profile
@mayrund
mayrund / removeWord.js
Created August 4, 2015 14:34
remove text from json collection
function transform(data) {
// filter functions are passed the whole API response object
// you may manipulate or add to this data as you want
// query parameters exist in the global scope, for example:
// http://www.kimonolabs.com/apis/<API_ID>/?apikey=<API_KEY>&myparam=test
// query.myparam == 'test'; // true
function removeWord(text, wordToRemove) {
text = text.replace(wordToRemove, '')
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 / 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 / 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 / Network Initialization Failed C:\PDOXUSERS.NET Permission Denied
Created November 21, 2016 10:57
Network Initialization Failed C:\PDOXUSERS.NET Permission Denied
EDBEngineError-Network Initialization Failed
Permission Denied
File C:\PDOXUSERS.NET
Directory: c:\
1. Create a new directory such as C:\BDEShare or use an existing folder (like My Documents).
2. Start the BDE Administration utility, located in: C:\Program Files (x86)\Common Files\Borland Shared\BDE\BDEADMIN.EXE
3. Click Configuration -> Drivers -> Native -> Paradox
4. Cick on the path next to NET DIR
5. Click the browse button to the right of the path