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
/* | |
Keeps checking the spirit of tasmania booking page for new available ferries. | |
I run this script in the chrome developer tools console with this page open: | |
https://www.spiritoftasmania.com.au/my-booking#?booking=XXXXX&lastname=YYYYY&step=ReturnFare&version=2 | |
To open chrome devtools press: Option + ⌘ + J (on macOS), or Shift + CTRL + J (on Windows/Linux) then click the console tab. | |
You need to be on the page because of browser security policies, but technically these requests dont require a browser env | |
and could also be run in a nodejs script. |
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
const execSync = require("child_process").execSync; | |
const writeFileSync = require("fs").writeFileSync; | |
const resolve = require("path").resolve; | |
function getDependencyInfo(dependency) { | |
return JSON.parse(execSync(`yarn info --json ${dependency}`)); | |
} | |
/** | |
upgradeCommonDependencies is only needed when using this script for dependencies shipped from the |
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
function clickNextEntry() { | |
$('[title="AUS_ Hours Worked | 7.6 Hours | Approved"]').click() | |
} | |
function selectNewFeatures() { | |
} |
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
npm run lint | grep '.*/partofpath/.*' | while read -r line ; do | |
echo "Processing $line" | |
# your code goes here | |
lebab --replace $line --transform args-rest | |
done |
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
class SomeClass { | |
constructor() { | |
this.x = 0; | |
} | |
getX() { | |
return this.x; | |
} | |
setX(val) { | |
this.x = val; | |
} |
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
Context = { | |
name: 'pablo', | |
dogs: [ | |
{ | |
name: 'Fikkie' | |
}, | |
{ | |
name: 'Jantje' | |
} | |
], |
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
1. Everything is tamas' fault | |
2. If in doubt revert to rule 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
#!/bin/sh | |
# Called by "git push" after it has checked the remote status, | |
# but before anything has been pushed. | |
# | |
# If this script exits with a non-zero status nothing will be pushed. | |
# | |
# Steps to install, from the root directory of your repo... | |
# 1. Copy the file into your repo at `.git/hooks/pre-push` | |
# 2. Set executable permissions, run `chmod +x .git/hooks/pre-push` |
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
Vagrant.configure("2") do |config| | |
config.vm.box = "trusty" | |
config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/trusty-server-cloudimg-amd64-juju-vagrant-disk1.box" | |
# we’ll forward the port 8000 from the VM to the port 8000 on the host (OS X) | |
config.vm.network :forwarded_port, host: 8000, guest: 8000 | |
#config.vm.synced_folder("vagrant-docker", "/vagrant") | |
config.vm.provider :virtualbox do |vb| | |
# vb.gui = true |
NewerOlder