Skip to content

Instantly share code, notes, and snippets.

@john-eevee
john-eevee / ubuntuGoesUp.sh
Last active October 14, 2024 07:23
Bash script to install everything I need on Ubuntu dists. Development and Desktop usage things
#!/bin/bash
# Update System
# Install prerequisites
echo 'Installing prerequisites...'
sudo apt-get install -y curl
sudo apt-get install -y autoconf
sudo apt-get install -y bison
sudo apt-get install -y build-essential
@montanaflynn
montanaflynn / check_for_dependencies.sh
Last active July 15, 2024 11:41
Checking for dependencies in a shell script
# Easy way to check for dependencies
checkfor () {
command -v $1 >/dev/null 2>&1 || {
echo >&2 "$1 required";
exit 1;
}
}
checkfor "ffmpeg"
@flcdrg
flcdrg / 1-boxstarter-bare-v4.ps1
Last active December 1, 2025 00:05
My BoxStarter Scripts
# 1. Install Chocolatey
<#
Set-ExecutionPolicy RemoteSigned -Force
# Create empty profile (so profile-integration scripts have something to append to)
if (-not (Test-Path $PROFILE)) {
$directory = [IO.Path]::GetDirectoryName($PROFILE)
if (-not (Test-Path $directory)) {
New-Item -ItemType Directory $directory | Out-Null
}
@bradp
bradp / setup.sh
Last active March 8, 2026 11:37
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo "https://github.com/account/ssh \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
@xtex404
xtex404 / ssh-config
Last active March 24, 2023 15:28
SSH configuration snippet for github via SSH
#
# SSH configuration snippet to enable SSH tunneling to github.com via
# port 443. Turns off all unnecessary SSH protocols extensions that slow
# things down or break things. In order to prevent SSH key leakage (which
# isn't dangerous, since it's just your public key, but it's still better
# if it didn't leave the network), this configuration will only use the
# SSH key specified on the "Identity" line.
#
# To use this gist: modify the "Identity" line to point to your SSH
# private key. In order to keep ssh from making git very angry, you should
@kiang
kiang / gist:9224e139320c230fedc5
Created December 24, 2014 01:41
batch push files into git repo with size limitation in each commit
<?php
$limit = 838860800;
exec('git status ' . __DIR__, $lines);
$lineCount = $currentFileSize = $pushCount = 0;
$sw = false;
foreach ($lines AS $line) {
if ($sw) {
++$lineCount;
if ($lineCount > 2) {
@ivanistheone
ivanistheone / .cleanup.sh
Last active March 5, 2026 20:32
A shell script I use to (mostly) automatically cleanup my ~/Desktop
#!/bin/bash
MYHOME=$HOME
MYDESKTOP=$HOME/Desktop
echo " _ "
echo " | | "
echo " ___ | | ___ __ _ _ __ _ _ _ __ "
echo " / __|| |/ _ \/ _ | '_ \| | | | '_ \ "
echo " | (__ | | __/ (_| | | | | |_| | |_) |"
echo " \___||_|\___|\__,_|_| |_|\__,_| .__/ "
@domenic
domenic / 0-github-actions.md
Last active June 21, 2026 22:49
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with GitHub Actions

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:

  • It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
  • It is free, with no quotas.
  • Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
@gabrielmoreira
gabrielmoreira / manjaro-install.sh
Last active May 2, 2023 18:16
Manjaro Install script
# Prepare pacman
sudo mkdir -p /root/.gnupg
sudo pacman-key --init && sudo pacman-key --populate archlinux manjaro && sudo pacman-key --refresh-keys
# Remove packages
sudo pacman -R empathy accerciser gnome-chess gnome-sudoku gnome-tetravex polari five-or-more four-in-a-row steam-native ipython hitori gnome-klotski steam quadrapassel gnome-nibbles aisleriot lightsoff gnome-mahjongg gnome-mines iagno gnome-robots tali swell-foop
# Upgrade all
sudo pacman -Syyu
@thongnguyenhuu
thongnguyenhuu / setup-ubuntu.sh
Last active January 23, 2023 13:27
Bash script for setup ubuntu #ubuntu #setup
#!/usr/bin/env bash
# Installing git
sudo apt-get install git -y
# Installing NodeJS
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install -y nodejs