Skip to content

Instantly share code, notes, and snippets.

@niw
niw / download_macos_and_create_install_disk.sh
Last active October 23, 2024 03:20
A script to download macOS install image and create an install disk image
#!/usr/bin/env bash
set -e
VOLUME_PATH=/Volumes/installer
while getopts ":d:h" opts; do
case $opts in
d)
VOLUME_PATH=$OPTARG
;;
@nickytonline
nickytonline / my-mac-setup.sh
Last active May 5, 2024 07:33
Mac Setup Scripts
#!/bin/sh
# More Mac setup at https://mac.iamdeveloper.com
# Log file
timestamp=$(date +%s)
logFile="./my-mac-setup-$timestamp.log"
# if true is passed in, things will reinstall
reinstall=$1
@fgilio
fgilio / axios-catch-error.js
Last active August 15, 2024 01:45
Catch request errors with Axios
/*
* Handling Errors using async/await
* Has to be used inside an async function
*/
try {
const response = await axios.get('https://your.site/api/v1/bla/ble/bli');
// Success 🎉
console.log(response);
} catch (error) {
// Error 😨
@gagarine
gagarine / install-clamav-osx.md
Last active October 1, 2024 20:38
Howto Install clamav on OSX with brew

Howto Install clamav on OSX with brew

Note: on legacy intel system the path may be /usr/local/etc/clamav instead of /opt/homebrew/etc/clamav/

$ brew install clamav
$ cd /opt/homebrew/etc/clamav/
$ cp freshclam.conf.sample freshclam.conf
@bisubus
bisubus / ES5-ES6-ES2017-ES2019 omit & pick
Last active April 13, 2024 21:03
ES5/ES6/ES2017/ES2019 omit & pick
@SinanGabel
SinanGabel / Cluster setup hints
Last active June 25, 2024 09:38
CouchDB 2.* on Ubuntu 16.04
# See also: http://docs.couchdb.org/en/latest/cluster/index.html
# Before you can add nodes to form a cluster, you have to have them listen on a public ip address
# and set up an admin user (use same admin:password for all nodes).
# Do this, once per node:
# If you have installed couchdb in /opt (else change the Path)
cd /opt/couchdb/etc
cp local.ini local.ini.orig
cp vm.args vm.args.orig
@russelldb
russelldb / tmux.md
Last active June 27, 2024 22:18 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@tylerchilds
tylerchilds / piplay_raspberry_pi_3_setup.md
Last active December 18, 2018 12:29
PiPlay Raspberry Pi 3 Setup

PiPlay Raspberry Pi 3 Setup

Let me first preface this guide with the fact that I had zero experience with raspberry pi before tonight. I'm comfortable in the command line and I've played with linux as an enthusiastic dabbler.

If you follow this guide, you should be able to go from fresh raspberry pi to running roms on piplay. Also, only use roms that you've legally obtained. I used Robot Bowl available for free, for non-commercial use at mamedev.org.

  1. Install raspbian to your sd card using a different computer than your pi

  2. plug in the pi your username/password will be pi/raspberry

@dhoko
dhoko / listDirectives.js
Last active November 13, 2019 06:33
AngularJs - get list of all registered directives
const listDirectivesApp = () => {
const listDirectives = name => {
return angular
.module(name)
._invokeQueue
.filter(item => 'directive' === item[1])
.map(item => item[2][0]);
};
return angular
@lukas-h
lukas-h / license-badges.md
Last active November 11, 2024 03:22
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)