Skip to content

Instantly share code, notes, and snippets.

View freshlogic's full-sized avatar

Shawn Miller freshlogic

View GitHub Profile
#!/bin/bash
# Install updates
sudo apt update -y
sudo apt -qq upgrade -y
sudo apt -qq autoremove -y > /dev/null
# Install Chromium
sudo apt install -y chromium-browser unclutter
@freshlogic
freshlogic / init.sh
Last active September 26, 2023 02:40
This is for Mac computers with Apple silicon: https://support.apple.com/en-us/HT211814
#!/bin/zsh
set -e
# Enable right clicking
defaults write com.apple.driver.AppleBluetoothMultitouch.mouse MouseButtonMode TwoButton
defaults write com.apple.driver.AppleHIDMouse Button2 -int 2
# You may need to reset the UI server or log out and back in for the changes to take effect
killall "SystemUIServer"
@freshlogic
freshlogic / init.sh
Last active June 15, 2021 16:55
This is for Mac computers with Intel processors
# This is for Mac computers with Intel processors
# For Mac computers with Apple silicon (https://support.apple.com/en-us/HT211814) see https://gist.github.com/freshlogic/fa3dcc44eedd36b4602d541ccd5b4368
# Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew update
# MongoDB
brew tap mongodb/brew
brew install mongodb-community@4.0
[
{
"id": "logical-trustworthy-glass",
"username": "shawn",
"offer": "2-pack-restorology-genius-pillow-cooling-gel-fiber-pillow-with-sateen-gusset-1",
"total": 29.00
},
{
"id": "distinguished-amusing-honeydew",
"username": "dave",
@freshlogic
freshlogic / gist:48f86ac9a332cb9d2390b131077b4a7e
Last active September 2, 2017 16:41
Coders Bracket 2016
function(game, team1, team2) {
var percentages = {
round5: { 1: 100, 2: 94, 3: 85, 4: 78, 5: 68, 6: 66, 7: 60, 8: 48, 9: 52, 10: 40, 11: 34, 12: 35, 13: 22, 14: 15, 15: 6, 16: 0 },
round4: { 1: 87, 2: 69, 3: 61, 4: 56, 5: 52, 6: 51, 7: 27, 8: 18, 9: 8, 10: 46, 11: 38, 12: 49, 13: 24, 14: 12, 15: 14, 16: 0 },
round3: { 1: 79, 2: 72, 3: 50, 4: 35, 5: 21, 6: 33, 7: 37, 8: 70, 9: 40, 10: 33, 11: 33, 12: 5, 13: 0, 14: 0, 15: 0, 16: 0 },
round2: { 1: 59, 2: 46, 3: 47, 4: 72, 5: 75, 6: 23, 7: 0, 8: 57, 9: 50, 10: 0, 11: 60, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0 },
round1: { 1: 57, 2: 48, 3: 64, 4: 23, 5: 50, 6: 67, 7: 0, 8: 50, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0 },
round0: { 1: 67, 2: 33, 3: 44, 4: 33, 5: 0, 6: 50, 7: 0, 8: 50, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0 }
};
@freshlogic
freshlogic / mailchimp.js
Last active May 24, 2016 04:31
Error 212
const mcapi = require('mailchimp-api');
const mailchimp = new mcapi.Mailchimp(process.env.mailchimpApiKey);
const mailchimpListId = process.env.mailchimpListId;
var subscribe = {
double_optin: false,
email: { email: 'test@mediocre.com' },
id: mailchimpListId
};
@freshlogic
freshlogic / gist:8de3afd667fc7c306e77
Created March 16, 2015 14:35
Coders Bracket 2015
function(game, team1, team2) {
var percentages = {
round5: { 1: 100, 2: 94, 3: 85, 4: 78, 5: 68, 6: 66, 7: 60, 8: 48, 9: 52, 10: 40, 11: 34, 12: 35, 13: 22, 14: 15, 15: 6, 16: 0 },
round4: { 1: 87, 2: 69, 3: 61, 4: 56, 5: 52, 6: 51, 7: 27, 8: 18, 9: 8, 10: 46, 11: 38, 12: 49, 13: 24, 14: 12, 15: 14, 16: 0 },
round3: { 1: 79, 2: 72, 3: 50, 4: 35, 5: 21, 6: 33, 7: 37, 8: 70, 9: 40, 10: 33, 11: 33, 12: 5, 13: 0, 14: 0, 15: 0, 16: 0 },
round2: { 1: 59, 2: 46, 3: 47, 4: 72, 5: 75, 6: 23, 7: 0, 8: 57, 9: 50, 10: 0, 11: 60, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0 },
round1: { 1: 57, 2: 48, 3: 64, 4: 23, 5: 50, 6: 67, 7: 0, 8: 50, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0 },
round0: { 1: 67, 2: 33, 3: 44, 4: 33, 5: 0, 6: 50, 7: 0, 8: 50, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0 }
};
{
"deal": {
"features": "- Model: S003AP, ACB0BU\r\n- Steer the little ball with your phone, it's fun, really\r\n- Compatible with iOS or Android, despite Apple-centric packaging\r\n- Includes Nubby Cover for all-terrain spherical action\r\n- Augmented-reality game apps might be more fun than rolling Sphero around your non-augmented reality, but we're not promising anything on that point",
"id": "a6ki0000000TON3AAO",
"items": [
{
"attributes": [
],
"condition": "Refurbished",
. (Resolve-Path "$env:LOCALAPPDATA\GitHub\shell.ps1")
If (Test-Path "cloud_package.cspkg") {
Remove-Item "cloud_package.cspkg" -Force
}
cd "WebRole"
iex "git reset --hard origin/master"
iex "git pull"
cmd /C "rmdir /S /Q node_modules"
%windir%\system32\inetsrv\AppCmd.exe set config -section:applicationPools -applicationPoolDefaults.processModel.idleTimeout:00:00:00