Skip to content

Instantly share code, notes, and snippets.

View bcawrse's full-sized avatar

Ben Cawrse bcawrse

View GitHub Profile
@bcawrse
bcawrse / install-choco-script.bat
Last active December 30, 2019 14:49 — forked from zaccb/install-choco-script.bat
Chocolatey install script
:: Install choco .exe and add choco to PATH
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
:: Install all the packages
:::: Browsers
choco install googlechrome -fy
choco install firefox -fy
:::: Text editors / IDEs
::choco install atom -fy
@bcawrse
bcawrse / terminalFlatTheme.sh
Created August 17, 2019 21:02 — forked from anmoljagetia/terminalFlatTheme.sh
This gist shows how to setup terminal colors in the new gnome-terminal (v 3.14) and above. This was generated using a site called http://terminal.sexy
#!/usr/bin/env bash
# Base16 - Gnome Terminal color scheme install script
[[ -z "$PROFILE_NAME" ]] && PROFILE_NAME="terminal.flat.theme"
[[ -z "$PROFILE_SLUG" ]] && PROFILE_SLUG="terminal-flat-theme"
[[ -z "$DCONF" ]] && DCONF=dconf
[[ -z "$UUIDGEN" ]] && UUIDGEN=uuidgen
dset() {
local key="$1"; shift
@bcawrse
bcawrse / publish-ghpages.md
Created July 26, 2020 23:19 — forked from tduarte/publish-ghpages.md
If you need to force push an subtree
git checkout master # you can avoid this line if you are in master...
git subtree split --prefix dist -b gh-pages # create a local gh-pages branch containing the splitted output folder
git push -f origin gh-pages:gh-pages # force the push of the gh-pages branch to the remote gh-pages branch at origin
git branch -D gh-pages # delete the local gh-pages because you will need it: ref
@bcawrse
bcawrse / powerline-test.sh
Created October 1, 2020 16:53 — forked from gdetrez/powerline-test.sh
Powerine font test
#!/bin/bash
echo -e "Powerline glyphs:\n\
Code points Glyphe Description Old code point
U+E0A0 \xee\x82\xa0 Version control branch (U+2B60 \xe2\xad\xa0 )\n\
U+E0A1 \xee\x82\xa1 LN (line) symbol (U+2B61 \xe2\xad\xa1 )\n\
U+E0A2 \xee\x82\xa2 Closed padlock (U+2B64 \xe2\xad\xa4 )\n\
U+E0B0 \xee\x82\xb0 Rightwards black arrowhead (U+2B80 \xe2\xae\x80 )\n\
U+E0B1 \xee\x82\xb1 Rightwards arrowhead (U+2B81 \xe2\xae\x81 )\n\
U+E0B2 \xee\x82\xb2 Leftwards black arrowhead (U+2B82 \xe2\xae\x82 )\n\
@bcawrse
bcawrse / bash.generate.random.alphanumeric.string.sh
Last active April 19, 2021 13:44 — forked from earthgecko/bash.generate.random.alphanumeric.string.sh
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
#NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# MAC is "special" and requires LC_CTYPE override & fold gets grumpy LOOK AT COMMENTS FROM OG
# NEW_UUID=$(cat /dev/urandom | LC_CTYPE=C tr -dc 'a-zA-Z0-9' | head -c 32)
# ALSO got all weird and had fractions / wild characters in selector with LC_CTYP=C
@bcawrse
bcawrse / Search my gists.md
Created July 22, 2021 18:34 — 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

@bcawrse
bcawrse / README.md
Created August 21, 2022 19:49 — forked from matusnovak/README.md
GPG + Git SSH Authentication and Signing on Windows 10

GPG + Git SSH Authentication and Signing on Windows 10

Introduction

This simple Gist will explain how to settup your GPG key to work for SSH authentication (with Git) and Git commit signing on Windows 10. This may seem straightforward on Linux, but there are certain tweaks needed on Windows.

No Cygwin, no MinGW, no Git Bash or any other Linux emulated environment. This works in pure Windows 10.

Software needed