Skip to content

Instantly share code, notes, and snippets.

View zushane's full-sized avatar

Shane Doucette zushane

View GitHub Profile
@bessfernandez
bessfernandez / setting-up-html-storybook-app.md
Last active March 28, 2023 16:37
How to setup a simple Storybook HTML demo app

icon-storybook-default

Storybook for HTML

Storybook is all about writing stories. A story usually contains a single state of one component, almost like a visual test case.

Typically you see Storybook used for React or other frameworks, but the library has recently introduced the option to use HTML for your Storybook projects. As a prototyping tool or playground this is great! No larger scale knowledge of other frameworks needed.

Install Storybook HTML

@mosquito
mosquito / README.md
Last active July 15, 2024 15:04
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@hbeatty
hbeatty / generate_sha512_hash.md
Last active September 13, 2018 01:08
How to generate a sha512 hash suitable for /etc/shadow using Mac OSX

How to generate a sha512 hash suitable for /etc/shadow using Mac OSX

$ sudo easy_install pip
$ pip install passlib
$ python -c "from passlib.hash import sha512_crypt; import getpass,string,random; print sha512_crypt.using(salt=''.join([random.choice(string.ascii_letters + string.digits) for _ in range(16)]),rounds=5000).hash(getpass.getpass())"
@frekele
frekele / aws-update-my-dynamic-ip.sh
Last active September 4, 2020 14:12
Script Update Dynamic Ips into AWS EC2 Security Groups. To run need to install aws cli, JQ and dnsutils.
#!/bin/bash
if [ $# -eq 0 ]
then
echo -e 'Please provide the name of a security group\n\te.g. . aws-update-my-dynamic-ip.sh SECURITYGROUPNAME'
exit 1
fi
GROUP_NAME=$1
@calum-github
calum-github / configure_dock.sh
Created January 11, 2016 23:17
dockutil script
#!/bin/bash
################################################################################
# Author: Calum Hunter #
# Date: 12/01/2016 #
# Version: 1.91 #
# Purpose: Default dock settings for user accounts #
# Configured via Dockutil #
# This should be run as a initial login script via LauchAgent #
################################################################################
@troyxmccall
troyxmccall / vagrant2vb.sh
Created September 17, 2015 21:51
automate your IE vms as much as is humanly fucking possible
#!/bin/sh
# vagrant2vb.sh
#
# Made for use alongside the excellent ievms -
# https://github.com/xdissent/ievms
#
# Will export the local hosts (from /etc/hosts)
# to a batch script & add that batch script to a Windows VM
# The batch script will be executed to import the hosts onto the VM
# The batch file seems convoluted, until you only want to append the new hosts.
@anthonysterling
anthonysterling / Vagrantfile
Last active April 29, 2020 15:28
Handy Vagrantfile for IE testing with Vagrant.
# Usage: IE={box} vagrant up
#
# Eg. IE=XPIE6 vagrant up
boxes = {
"XPIE6" => "http://aka.ms/vagrant-xp-ie6",
"XPIE8" => "http://aka.ms/vagrant-xp-ie8",
"VistaIE7" => "http://aka.ms/vagrant-vista-ie7",
"Win7IE8" => "http://aka.ms/vagrant-win7-ie8",
"Win7IE9" => "http://aka.ms/vagrant-win7-ie9",
@brandonmwest
brandonmwest / example.cs
Last active June 27, 2024 04:03
Generating base64-encoded Authorization headers in a variety of languages
httpClient.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue(
"Basic",
Convert.ToBase64String(
System.Text.ASCIIEncoding.ASCII.GetBytes(
string.Format("{0}:{1}", username, password))));
@tylerwalts
tylerwalts / setupOSX.sh
Created March 5, 2014 19:56
This is a bash script to setup Mac OS X defaults on a new mac.
#!/bin/bash
#
# Set up OSX preferences
#
# Inspired by: https://github.com/mathiasbynens/dotfiles/blob/master/.osx
###########################################
# CONFIG
HOSTNAME="machiavellia"
TIMEZONE="America/Chicago" # 'systemsetup -listtimezones'
@bjtitus
bjtitus / backup-github.sh
Last active May 18, 2022 09:14 — forked from rodw/backup-github.sh
A shell script to backup your Github organization's repos.
#!/bin/bash
# A simple script to backup an organization's GitHub repositories.
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up
GHBU_API=${GHBU_API-"https://api.github.com"} # base URI for the GitHub API
GHBU_GITHOST=${GHBU_GITHOST-"<CHANGE-ME>.github.com"} # the GitHub hostname (see comments)
# I recommend using an API token so it is easily trackable and removable.
# Note that you MUST have SSH keys for a user with the access to all repos set up