Skip to content

Instantly share code, notes, and snippets.

View KarateJB's full-sized avatar
💭
May the Force be with you.

JB KarateJB

💭
May the Force be with you.
View GitHub Profile
@KarateJB
KarateJB / vim-plugin-directories
Created May 23, 2023 06:02 — forked from nelstrom/vim-plugin-directories
An overview of what belongs in each directory of a Vim plugin.
plugin
naming convention: name_of_plugin.vim
these files are sourced for all file types
doc
naming convention: name_of_plugin.txt
these files document the functionality of a plugin
color
naming convention: name_of_colorscheme.vim
@KarateJB
KarateJB / curl.md
Created May 11, 2023 07:36 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@KarateJB
KarateJB / appcmd-command-ref
Created February 23, 2023 03:17 — forked from jetstreamin/appcmd-command-ref
appcmd most common commands
1. Add Site
appcmd add site /name:MySite /bindings:http://*:80 /physicalpath:”d:\MySitePath”
2. Add App Pool
appcmd add apppool /name:MyAppPool /managedRuntimeVersion:v4.0 (e.g. targeting .NET 4.0)
3. Set App Pool Credential
appcmd set config /section:applicationPools /[name='MyAppPool'].processModel.identityType:SpecificUser /[name='MyAppPool'].processModel.userName:MyDomain\MyAccount /[name='MyAppPool'].processModel.password:MyAccountPassword
4.Add App
appcmd add app /site.name:"MySite" /path:/MyApp /physicalpath:"d:\MySitePath\MyApp"
5. Assign/Change App Pool to an App
@KarateJB
KarateJB / compiler.python.vim
Created November 11, 2022 00:30 — forked from SuryaThiru/compiler.python.vim
Simple compiler for vim to fill python traceback in the quickfix window. Copy the file to `.vim/compiler/python.vim`.
" https://vi.stackexchange.com/questions/5110/quickfix-support-for-python-tracebacks
if exists("current_compiler")
finish
endif
let current_compiler = "python"
let s:cpo_save = &cpo
set cpo&vim
@KarateJB
KarateJB / foo.rb
Created October 26, 2022 11:40 — forked from DazWorrall/foo.rb
Redis sorted sets with timestamps for scores
require 'redis'
require 'active_support/time'
redis = Redis.new
# members are added with a score that is a timestamp of when they should expire
redis.zadd('test-sset', 10.minutes.from_now.to_i, 'app1')
# let's add one in the past so we can test some more
redis.zadd('test-sset', 10.minutes.ago.to_i, 'app2')

Cmder

# Copy current path to clipboard
cd | clip


@KarateJB
KarateJB / while.sh
Created December 24, 2021 01:22
Shell Scripts
#! bin/bash
export counter=1
(
while [ $counter -le 5 ]; do
export counter=`expr $counter + 1`
echo $counter
done
)
@KarateJB
KarateJB / vimium-custom-key-mappings
Created September 11, 2021 05:00 — forked from 383c57/vimium-custom-key-mappings
Vimium Custom key mappings
unmapAll
map <c-n> scrollDown
map j scrollDown
map <c-p> scrollUp
map k scrollUp
map <c-H> scrollLeft
map <c-L> scrollRight
map <a-<> scrollToTop
map <a->> scrollToBottom
map <a-v> scrollFullPageUp
@KarateJB
KarateJB / Search my gists.md
Created September 2, 2021 05:18 — forked from santisbon/Search my gists.md
How to search gists

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@KarateJB
KarateJB / gitflow-breakdown.md
Created August 26, 2021 15:36 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository