Skip to content

Instantly share code, notes, and snippets.

View marcodejongh's full-sized avatar

Marco de Jongh marcodejongh

  • Atlassian
  • Sydney
View GitHub Profile
Context = {
name: 'pablo',
dogs: [
{
name: 'Fikkie'
},
{
name: 'Jantje'
}
],
class SomeClass {
constructor() {
this.x = 0;
}
getX() {
return this.x;
}
setX(val) {
this.x = val;
}
npm run lint | grep '.*/partofpath/.*' | while read -r line ; do
echo "Processing $line"
# your code goes here
lebab --replace $line --transform args-rest
done
function clickNextEntry() {
$('[title="AUS_ Hours Worked | 7.6 Hours | Approved"]').click()
}
function selectNewFeatures() {
}
const execSync = require("child_process").execSync;
const writeFileSync = require("fs").writeFileSync;
const resolve = require("path").resolve;
function getLatestDependencyVersion(dependency) {
return JSON.parse(execSync(`yarn info --json ${dependency}`)).data.version;
}
const packageJsonPath = resolve(process.cwd(), "./package.json");
console.log("Updating editor-core");
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
/*
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.