Skip to content

Instantly share code, notes, and snippets.

View boboben1's full-sized avatar
🏠
Working from home

Ben boboben1

🏠
Working from home
  • Brecher Trading, LLC
View GitHub Profile
@boboben1
boboben1 / extensions.txt
Created March 9, 2024 19:15
My VSCODE Extensions
alexiv.vscode-angular2-files
angular.ng-template
christian-kohler.npm-intellisense
christian-kohler.path-intellisense
coenraads.bracket-pair-colorizer
cschlosser.doxdocgen
davidanson.vscode-markdownlint
dbaeumer.vscode-eslint
dskwrk.vscode-generate-getter-setter
eamodio.gitlens
@boboben1
boboben1 / colormap.py
Created November 28, 2021 22:50
Matplotlib gradients
Written by Ben Brecher
def interp_color(c1, c2, space):
c1 = np.array(c1)
c2 = np.array(c2)
return [(1-p) * c1 + p * c2 for p in space]
def make_color_map(*in_colors):
color_map = np.ones((256, 4))
@boboben1
boboben1 / fib.py
Created August 12, 2021 16:37
Fast Fib Using Exponentiation by Squaring and Binets Algorithm using only integers
# Combined Exponentiation by Squaring and Binet's Algorithm. Encoded as a + b sqrt(5). Phi**n - phi**n = 0 + 2 (Phi**n)_b sqrt(5)
def fast_fib(n):
n -= 1
a, b, r, s = 1, 1, 1, 1
while 1:
if n & 1 == 1:
r, s = a*r+5*b*s >> 1, a*s+b*r >> 1
n >>= 1
if n == 0:
@boboben1
boboben1 / EXAPUNKS_ZEBRA_XA
Last active May 16, 2020 22:59
Zebros Solution
LINK 800
GRAB 200
COPY M X
MARK L
TEST F = X
SEEK 2
FJMP L
SEEK -2
@boboben1
boboben1 / china_list.xml
Last active September 1, 2019 19:57
WoT Vehicles Listing
<list.xml>
<Ch01_Type59>
<id> 0 </id>
<userString> #china_vehicles:Ch01_Type59 </userString>
<description> #china_vehicles:Ch01_Type59_descr </description>
<shortDescriptionSpecial> #china_vehicles:Ch01_Type59_short_special </shortDescriptionSpecial>
<longDescriptionSpecial> #china_vehicles:Ch01_Type59_long_special </longDescriptionSpecial>
<price> 7500 <gold></gold>
</price>
<notInShop> true </notInShop>
[Setup]
Lang=en
Dir=E:\Games\World_of_Tanks_NA
Group=(Default)
NoIcons=0
SetupType=custom
Components=xvm,xvm\otm,xvm\otm\aslain,xvm\otm\aslain\overhpbarfield_1,xvm\otm\aslain\overhpbarfield_l\vehiclename,xvm\otm\aslain\overhpbarfield_l\vehiclename\premiumstar,xvm\otm\aslain\overhpbarfield_l\vehiclename\colorednames,xvm\otm\aslain\overhpbarfield_2,xvm\otm\aslain\overhpbarfield_2\playername,xvm\otm\aslain\otm_leftside,xvm\otm\aslain\otm_leftside\tier_roman,xvm\otm\aslain\otm_rightside,xvm\otm\aslain\otm_rightside\hpratio,xvm\otm\aslain\wnmarker,xvm\otm\aslain\wnmarker\star,xvm\otm\aslain\lowhpmarker,xvm\otm\aslain\lowhpmarker\big_ex2,xvm\otm\aslain\classicons,xvm\otm\aslain\classicons\default,xvm\otm\aslain\position,xvm\otm\aslain\position\default,xvm\otm\aslain\position\incwonly,xvm\otm\aslain\floating_style,xvm\otm\aslain\floating_style\old,xvm\otm\aslain\floating,xvm\otm\aslain\floating\destroyedvehicleangelwings,xvm\otm\aslain\hitpoints,xvm\otm\aslain\hitpoints\min,xvm\otm\aslain\turretmarker,xvm\otm\aslain
@boboben1
boboben1 / autoexec.cfg
Last active May 13, 2019 04:05
CSGO Settings
host_writeconfig
sv_cheats 1
voice_scale 0.5
snd_setmixer PlayerFootsteps vol 0.1
snd_setmixer GlobalFootsteps vol 1.2
snd_setmixer Ambient vol 0.0
snd_setmixer Dialog vol 0.1
@boboben1
boboben1 / cloudSettings
Created February 11, 2019 17:43
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-02-11T17:43:14.712Z","extensionVersion":"v3.2.4"}
@boboben1
boboben1 / resolve-tsconfig-path-to-webpack-alias.js
Last active January 16, 2019 17:53 — forked from nerdyman/resolve-tsconfig-path-to-webpack-alias.js
Convert TypeScript tsconfig paths to webpack alias paths
const { resolve } = require('path');
/**
* Resolve tsconfig.json paths to Webpack aliases
* @return {object} - Webpack alias config
*/
function resolveTsconfigPathsToAlias({
tsconfigPath = './tsconfig.json',
webpackConfigBasePath = './'},
) {
@boboben1
boboben1 / post_commit
Created January 9, 2019 16:03
Automatic git tagging for NPM
#!/bin/bash; C:/Program\ Files/Git/usr/bin/sh.exe
version=`git diff HEAD^..HEAD -- "$(git rev-parse --show-toplevel)"/package.json | grep '^\+.*version' | sed -s 's/[^0-9\.]//g'`
if [ "$version" != "" ]; then
git tag -a "v$version" -m "`git log -1 --format=%s`"
echo "Created a new tag, v$version"
fi