Skip to content

Instantly share code, notes, and snippets.

View i-e-b's full-sized avatar
🤔
Thinking

Iain Ballard i-e-b

🤔
Thinking
View GitHub Profile
@i-e-b
i-e-b / A_Profile_BJSS.ps1
Last active October 28, 2023 13:27
My sample Powershell profile script
Set-PSReadlineOption -BellStyle None
# Clone `https://github.com/dahlbyk/posh-git.git` to C:\Gits
Import-Module 'C:\Gits\posh-git\src\posh-git.psd1'
set-executionpolicy Unrestricted process
$baseDir = Split-Path -parent $MyInvocation.MyCommand.Definition
#. "$baseDir\hand.ps1"
# General actions
function edit ($file) { & "${env:ProgramFiles(x86)}\Notepad++\notepad++.exe" $file }
@lbj96347
lbj96347 / jsKeyCode.txt
Created May 1, 2012 13:31
javascript Key Code
keycode 8 = BackSpace BackSpace
keycode 9 = Tab Tab
keycode 12 = Clear
keycode 13 = Enter
keycode 16 = Shift_L
keycode 17 = Control_L
keycode 18 = Alt_L
keycode 19 = Pause
keycode 20 = Caps_Lock
keycode 27 = Escape Escape
@i-e-b
i-e-b / .gitignore
Last active October 7, 2015 01:18
A .Net / VisualStudio über ignore file
obj
bin
deploy
*.csproj.user
*.suo
*.cache
~$*
*~
*ReSharper*
*.swp
@cab1729
cab1729 / ComplexFun.cs
Created July 20, 2012 19:08
C# Math trig functions using System.Numerics.Complex type
using System;
using System.Numerics;
namespace MathFun
{
/// <summary>
/// Trig functions for Complex numbers
/// </summary>
/// <remarks>
/// main reference: Schaum's Outlines: Complex Variables ISBN-13: 978-0070602304
@jshih
jshih / .vimrc
Created August 22, 2012 07:18
Enable Ctrl+c and Ctrl+v for copy and paste in gvim
vmap <C-c> "+yi
vmap <C-x> "+c
vmap <C-v> c<ESC>"+p
imap <C-v> <ESC>"+pa
@spikebrehm
spikebrehm / modifierKey.js
Created September 19, 2012 02:50
Determine if a modifier key is pressed in JavaScript.
// modifierKey used to check if cmd+click, shift+click, etc.
!function($, global){
var $doc = $(document);
var keys;
global.modifierKey = false;
global.keys = keys = {
'UP': 38,
'DOWN': 40,
@MatthewSteeples
MatthewSteeples / gist:5588087
Created May 15, 2013 22:56
Code to rename namespaces from compiled assemblies using Mono.Cecil
using Mono.Cecil;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
namespace CecilTest
@i-e-b
i-e-b / .vimrc
Last active March 24, 2017 11:00
vim configuration files for Window
" THIS rc is for VsVim under Visual Studio on Windows
set virtualedit=onemore
set selectmode=
set number
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
set backspace=indent,eol,start
@on-three
on-three / gist:9e40cbf33765dbd3ffbb
Last active October 11, 2022 14:09
VLC capture window by xwindows id (window capture and streaming WITH audio)
1: Get the audio output device you'll record off:
pacmd list-sources | awk '/name:.+\.monitor/'
name: <alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor>
name: <alsa_output.pci-0000_00_1b.0.analog-stereo.monitor>
2: Get the x windows id (linux) of the window you'll capture
xwininfo -name "Nestopia"
xwininfo: Window id: 0x3a00003 "Nestopia"
...
@smhanov
smhanov / dawg.py
Last active April 26, 2023 16:01
Use a DAWG as a map
#!/usr/bin/python3
# By Steve Hanov, 2011. Released to the public domain.
# Please see http://stevehanov.ca/blog/index.php?id=115 for the accompanying article.
#
# Based on Daciuk, Jan, et al. "Incremental construction of minimal acyclic finite-state automata."
# Computational linguistics 26.1 (2000): 3-16.
#
# Updated 2014 to use DAWG as a mapping; see
# Kowaltowski, T.; CL. Lucchesi (1993), "Applications of finite automata representing large vocabularies",
# Software-Practice and Experience 1993