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 | |
echo "Cleaning Xcode..." | |
# Clear Xcode Caches | |
CLEANDIRS=("~/Library/Developer/Xcode/DerivedData" \ | |
"~/Library/Caches/org.swift.swiftpm" \ | |
"~/Library/Caches/org.swift.swiftpm.$USER" \ | |
"$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache" \ | |
"$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$USER/ModuleCache" \ |
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
{ | |
"workbench.startupEditor": "none", | |
"workbench.sideBar.location": "right", | |
"editor.renderWhitespace": "boundary", | |
"editor.suggest.snippetsPreventQuickSuggestions": false, | |
"emmet.showAbbreviationSuggestions": false, | |
"editor.wordBasedSuggestions": "off", | |
"editor.snippetSuggestions": "none", | |
"editor.inlineSuggest.enabled": true, | |
"editor.acceptSuggestionOnCommitCharacter": false, |
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
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <filesystem> | |
#include <cstdlib> | |
#include <regex> | |
/** This program executes a command for each file in a directory that matches a filter. | |
Usage : test_args <directory> <file-filter> <executable> [extra arguments...] |
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 | |
# http://github.com/wheresjames | |
# Run this from the command line like | |
# | |
# $ ~/path/to/cmake-tasks.sh clean-config-build release build ./some/cmake/project | |
# | |
# OR | |
# | |
# $ cd ./some/cmake/project |
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
echo $DOMAINNAME | |
# Get cert expire info | |
EXPDATE=$(echo | openssl s_client -servername $DOMAINNAME -connect $DOMAINNAME:443 2>/dev/null | openssl x509 -noout -enddate) | |
EXPDATE2=${EXPDATE[@]:9} | |
FMTDATE=$(date --date="$EXPDATE2" "+%Y-%m-%d %H:%M:%S") | |
# Cert expire time | |
EXPTIME=$(date --date="$EXPDATE2" +%s) |
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
function promiseWhile(cond, prom) { | |
return prom().then(r=> { return cond(r) ? promiseWhile(cond, prom) : r; }); | |
} | |
function countTo(n) { | |
let i = 0; | |
return promiseWhile((r)=> r < n, () => { | |
return new Promise((resolve, reject)=> { | |
console.log(i); | |
setTimeout(()=>{i++; resolve(i);}, 1000); |
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 | |
#-------------------------------------------------------------------------------------------------- | |
# | |
# Examples | |
# | |
# Setup new instance | |
# $ ./linode-deploy.sh create-setup <username> newserver.example.com | |
# | |
# After you've added the IP address to your DNS, get a lets encrypt cert with |
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 python3 | |
from __future__ import print_function | |
import os | |
import sys | |
import time | |
import json | |
import random | |
import inspect | |
import argparse |
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/node | |
const fs = require('fs'); | |
const path = require('path'); | |
const shell = require('shelljs'); | |
const cp = require('child_process'); | |
const c_Usage = "USAGE: ./npm-global-install.js <path-to-package.json>"; | |
const c_start_time = new Date().getTime() / 1000; |
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 | |
# Compress web site | |
#-------------------------------------------------------------------------------------------------- | |
USAGE="Usage: ./compress-web.sh <source-dir> <destination-dir>" | |
SCRIPT_NAME=$(basename $0) | |
SCRIPT_PATH=$(dirname "$(readlink -f "$0")") |
NewerOlder