This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
import argparse | |
import glob | |
import plistlib | |
import re | |
from os import path, mkdir | |
import yaml | |
''' |
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
#!/usr/bin/python3 | |
import yaml | |
import sys | |
import csv | |
# create root yaml | |
matches = [] | |
# open file |
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam' | |
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes' | |
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no' |
on run {input, parameters} | |
set delimitedList to paragraphs of (input as string) | |
tell application "Things3" | |
repeat with currentTodo in reverse of delimitedList | |
set newToDo to make new to do with properties {name:currentTodo} at beginning of list "Inbox" | |
end repeat | |
end tell | |
end run |
I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6
apt-get update && apt-get install gdb
Facter.add(:service_provider) do | |
setcode do | |
Puppet::Type.type(:service).newservice(:name => 'anyservice')[:provider].to_s | |
end | |
end |
Taken from https://github.com/bahamas10/dotfiles/blob/master/bashrc
Show amount of billable storage spaced used in Manta
#! /bin/bash | |
CACERT='/etc/puppetlabs/puppet/ssl/certs/ca.pem' | |
CERT='/opt/puppet/share/puppet-dashboard/certs/pe-internal-dashboard.cert.pem' | |
KEY='/opt/puppet/share/puppet-dashboard/certs/pe-internal-dashboard.private_key.pem' | |
HOST=$(hostname -f) | |
URL='production/resource/node' | |
curl --cacert ${CACERT} --cert ${CERT} --key ${KEY} "https://${HOST}:8140/${URL}" |
// Use this Mac OS X automation script to quickly hide notifications for | |
// distracting apps. Put the names of the distracting apps in the | |
// `distractingApps` array and save the script. Run the script to toggle the | |
// badges on and off. | |
// Tip: To run this script much faster, move the distracting apps to the top of | |
// the list in System Preferences's Notifications pane. | |
var distractingApps = ['Tweetbot', 'Slack'] |