The latest version is in this repo
This file contains hidden or 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
$ uname -a | |
Linux pi 3.12.35+ #730 PREEMPT Fri Dec 19 18:31:24 GMT 2014 armv6l GNU/Linux | |
$ sudo apt-get -y upgrade openssh-client | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. | |
$ ssh-keygen -t ed25519 | |
unknown key type ed25519 |
This file contains hidden or 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
# app.rb | |
require "sinatra" | |
get "/status" do | |
<<~HTML | |
<h1>Hello Status!</h1> | |
<img src="images/cloud.png"> | |
<p>The environment is #{ENV['APP_ENV'] || 'unknown'}.</p> | |
HTML | |
end |
This file contains hidden or 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
# username@ ~/workspace/repo (branch) | |
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\] \[\033[33;1m\]\w\[\033[m\] (\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)) \$ " |
This file contains hidden or 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
name: Add new issues to project board | |
on: | |
issues: | |
types: [opened] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: |
This file contains hidden or 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
name: Set new issues with Monday details | |
on: | |
issues: | |
types: [opened] | |
jobs: | |
set-new-issues-with-monday-details: | |
runs-on: ubuntu-latest | |
steps: |
This file contains hidden or 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 | |
# Keep this associative array up-to-date based on perforce packages | |
declare -A releases=( ["12.04"]="precise" ["14.04"]="trusty" ["16.04"]="xenial") | |
# https://www.perforce.com/perforce/doc.current/manuals/p4sag/chapter.install.html#install.linux.packages | |
os_name=`grep ^NAME= /etc/os-release | cut -c6- | tr -d '"'` | |
if [[ $os_name != "Ubuntu" ]] ; then | |
echo 'Sorry, only for Ubuntu.' | |
exit 1 |
This file contains hidden or 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
# config/environments/production.rb | |
# Local mail delivery using IIS SMTP Service | |
require 'shim/mail_message' # fix line endings | |
config.action_mailer.delivery_method = :file | |
config.action_mailer.file_settings = { location: "#{ENV['SystemDrive']}/InetPub/MailRoot/Pickup" } | |
# lib/shim/mail_message.rb | |
# Patch Mail::Message to enforce proper line-endings for Windows IIS file-type delivery. | |
module Mail | |
class Message |
This file contains hidden or 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 typescript | |
class Greeter { | |
name: string; | |
constructor(name?: string) { | |
this.name = name || 'Nobody'; | |
} | |
say_hello() { | |
console.log("Hello " + this.name); |
This file contains hidden or 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 bash | |
TSFILE=${@##*/} | |
JSFILE=${TSFILE/%ts/js} | |
MD5DIR=`md5 -q ${@}`/ | |
if [ ! -d $TMPDIR$MD5DIR ]; then | |
mkdir $TMPDIR$MD5DIR | |
fi | |
if [ ! -f $TMPDIR$MD5DIR$JSFILE ] || [ ${@} -nt $TMPDIR$MD5DIR$JSFILE ]; then | |
tsc --outDir $TMPDIR$MD5DIR ${@} | |
fi |
NewerOlder