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
/* | |
Model: Basic cone hose converter | |
Author: Dan Higham | |
*/ | |
$fa = 1; | |
$fs = 0.4; | |
//PARAMS | |
cone_length = 35; |
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
docker ps -q | xargs docker stats --no-stream --format "table {{.Name}}\t{{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}" | sort -k 4 -h |
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
# Remove all replicasets with 0 pods | |
for i in $(kubectl get rs -o json | jq -r '.items[] | select(.status.replicas==0) | .metadata.name'); do kubectl delete rs/$i; done | |
# Remove all resources with a certain label set | |
for i in $(kubectl api-resources -o name); do for x in $(kubectl get $i -l "kapp.k14s.io/app=1586922989415912400" -o name); do kubectl delete $x; done; done |
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 | |
s3cmd ls -r $1/ | while read -r line; | |
do | |
createDate=`echo $line|awk {'print $1" "$2'}` | |
createDate=`date -d"$createDate" +%s` | |
olderThan=`date --date "7 days ago" +%s` | |
if [[ $createDate -lt $olderThan ]] | |
then | |
fileName=`echo $line|awk {'print $4'}` |
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 main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"sort" | |
"strings" | |
"syscall" |
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
source :rubygems | |
gem 'cfoundry' | |
gem 'uuidtools' |
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/python | |
import json, subprocess | |
def cf_curl_json(cmd): | |
return json.loads(subprocess.Popen(("cf curl %s | jq '.resources[].entity' | jq --slurp '.'" % cmd), | |
stdout=subprocess.PIPE, shell=True).communicate()[0]) | |
ORGS_SPACEURLS = [ (str(org['name']), str(org['spaces_url'])) for org in cf_curl_json("/v2/organizations") ] | |
for org, spaces_url in ORGS_SPACEURLS: | |
ORG_SPACE_APPURLS = [ (org, str(space['name']), str(space['apps_url'])) for space in cf_curl_json(spaces_url) ] | |
for org, space, app_url in ORG_SPACE_APPURLS: |
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
making the ubnt wifi awesome (uap ac lite) w/ lede (openwrt) | |
the reasons you would do this: | |
- you get 802.11r | |
- you get better roaming | |
- you get access to some new 5ghz channels | |
I AM NOT TO BE HELD RESPONSIBLE FOR ANYTHING IN HERE. DO AT YOUR OWN RISK. THANK YOU AND HAVE A LOVELY DAY. | |
** note that though we're using Lede, it's essentially openwrt minus the drama |
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 <bitswap.h> | |
#include <chipsets.h> | |
#include <color.h> | |
#include <colorpalettes.h> | |
#include <colorutils.h> | |
#include <controller.h> | |
#include <cpp_compat.h> | |
#include <dmx.h> | |
#include <FastLED.h> | |
#include <fastled_config.h> |
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
{ | |
"response": { | |
"card": { | |
"image": { | |
"largeImageUrl": "https://lh3.googleusercontent.com/53cYhGcuBl6tJh4NAsrkxHW2dYReUv27bwrA1nb_KNCrgIKeGjhfl-NmUzsu6mJGoyg1UBuvpDM", | |
"smallImageUrl": "https://lh3.googleusercontent.com/53cYhGcuBl6tJh4NAsrkxHW2dYReUv27bwrA1nb_KNCrgIKeGjhfl-NmUzsu6mJGoyg1UBuvpDM" | |
}, | |
"text": "", | |
"title": "Playing top tracks by Radiohead", | |
"type": "Standard" |
NewerOlder