This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# EditorConfig is awesome: https://EditorConfig.org | |
# | |
# More info about editorconfig for C# and .NET in Visual Studio see: | |
# https://docs.microsoft.com/en-us/visualstudio/ide/create-portable-custom-editor-options?view=vs-2019 | |
# | |
# Most of the .NET and C# rules below were taken from the | |
# Microsoft Roslyn team's editorconfig at: | |
# https://github.com/dotnet/roslyn/blob/master/.editorconfig | |
# Top-most EditorConfig file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE master | |
go | |
SELECT sdes.database_id | |
,sdes.[host_name] | |
,sdes.[program_name] | |
,sdes.login_name | |
,sdes.login_time | |
,sdec.client_net_address | |
,sdec.local_net_address | |
,sdest.Query |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dis | |
# Run this with python3 : ) | |
class VM: | |
def __init__(self): | |
self.stack = [] | |
def push(self, value): | |
self.stack.append(value) | |
def pop(self): | |
return self.stack.pop() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put this function to your .bashrc file. | |
# Usage: mv oldfilename | |
# If you call mv without the second parameter it will prompt you to edit the filename on command line. | |
# Original mv is called when it's called with more than one argument. | |
# It's useful when you want to change just a few letters in a long name. | |
# | |
# Also see: | |
# - imv from renameutils | |
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste) |
List of useful npx (NPM Package Runner) commands.
Using NPX we can execute/run node binaries without the need to install it locally or globally.
Web Application Hacker's Handbook Task checklist as a Github-Flavored Markdown file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Tracking cursor position in real-time without JavaScript | |
// Demo: https://twitter.com/davywtf/status/1124146339259002881 | |
package main | |
import ( | |
"fmt" | |
"net/http" | |
"strings" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. A General Fast Method Invoker (https://www.codeproject.com/Articles/14593/A-General-Fast-Method-Invoker) | |
public static FastInvokeHandler GetMethodInvoker(MethodInfo methodInfo) | |
{ | |
DynamicMethod dynamicMethod = new DynamicMethod(string.Empty, | |
typeof(object), new Type[] { typeof(object), | |
typeof(object[]) }, | |
methodInfo.DeclaringType.Module); | |
ILGenerator il = dynamicMethod.GetILGenerator(); | |
ParameterInfo[] ps = methodInfo.GetParameters(); | |
Type[] paramTypes = new Type[ps.Length]; |
NewerOlder