This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Lifted from Stack Overflow. This worked for me, it's fast, yes but it still takes awhile to write to a 500 GB | |
# disk - about 3-4 hours. Instead of just filling up the disk I routed it to an output file and included a count. | |
# Also I have replaced seq with | |
# echo {1..65536} | |
# as being part of coreutils, seq is unavailable in restore mode on OS X. | |
# So the command I used to run the script was: | |
# sh /tmp/writeones.sh | dd of=/Volumes/Machintosh\ HD/output.txt bs=65536 count=500000000 | |
# --sew | |
# HOWEVER, if you think of it first, use the shred tool. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const app = express(); | |
const WebSocket = require("ws"); | |
app.get('/', function (req, res) { | |
res.send('This is not really a web page.'); | |
}); | |
const port = 3997 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# emojis help instantly recognize something went wrong and where | |
function exit_err() { echo "❌ 💔" ; exit 1; } | |
set -Euo pipefail | |
echo "Updating your repo." | |
echo "☕️ Take a break - this might take a few minutes." | |
git stash | |
git co master -q | |
git pull origin master --ff-only -q |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export GO_NAMES='\.(go)$' | |
export GO_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E $GO_NAMES) | |
function exit_err() { echo "❌ 💔" ; exit 1; } | |
if [[ ! -z $GO_FILES ]] | |
then | |
echo "Examining $GO_FILES" | |
echo $GO_FILES | xargs gofmt -s -w || exit_err |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export JSNAMES='\.(js|ts)$' | |
export JSNAMES=$(git diff --cached --name-only --diff-filter=ACM | grep -E $JSNAMES) | |
function exit_err() { echo "❌ 💔" ; exit 1; } | |
if [[ ! -z $JSNAMES ]] | |
then | |
echo "Examining $JSNAMES" | |
echo $JSNAMES | xargs npm run format || exit_err |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package reflect_cats_test | |
import ( | |
"encoding/json" | |
"net/url" | |
"reflect" | |
"testing" | |
"github.com/stretchr/testify/assert" | |
"github.com/stretchr/testify/require" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
PWD=`pwd` | |
FILES="AllApps casks formulas" | |
source ./utils.sh | |
for file in ${FILES} ; do | |
if [ ! -f ${file} ] ; then | |
exit_err "${file} is missing. Ensure the following files are all present, then rerun: ${FILES}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
RUBOCOP_NAMES='\.(rb|rake)$' | |
ESLINT_NAMES='\.(es6|jsx|js)$' | |
PRETTIER_NAMES='\.(es6|jsx|js|scss|json)$' | |
RUBOCOP_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E $RUBOCOP_NAMES) | |
ESLINT_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E $ESLINT_NAMES) | |
PRETTIER_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E $PRETTIER_NAMES) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This is specifically for the go-filecoin repo but a subset of this can apply to any go project with git | |
# https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ | |
set -Euo pipefail | |
echo "Updating your repo." | |
echo "☕️ Take a break - this might take a few minutes." | |
git stash | |
git co master -q |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
THISDIR="dirname ${BASH_SOURCE}" | |
echo "Updating your repo." | |
echo "☕️ Take a break - this might take a few minutes." | |
git co development -q | |
git pull origin development --ff-only -q | |
git fetch --prune -q | |
bundle install --quiet | |
yarn install -s |
NewerOlder