Skip to content

Instantly share code, notes, and snippets.

Avatar

Jacob jacobq

View GitHub Profile
@jacobq
jacobq / update-dynamic-dns.sh
Last active Jul 14, 2020
FreeDNS (afraid.org) dynamic DNS updater script: e.g put in /etc/cron.hourly/update-dynamic-dns.sh
View update-dynamic-dns.sh
#!/bin/sh
# FreeDNS updater script
# Adapted from https://freedns.afraid.org/scripts/update.sh.txt
# sudo apt install dnsutils wget
DOMAIN="foo.my-custom-domain.com"
API_KEY="put your API key (base64 string) here"
SHOULD_UPDATE=0
# -f is the only argument supported right now (forces update even if address appears correct)
@jacobq
jacobq / index.html
Created Jan 9, 2020
Electron Fiddle Gist
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Dialog Demo</title>
</head>
<body>
<h1>Click the button</h1>
<button id="save">Show save dialog</button>
<pre id="output"></pre>
View keybase-gh-proof1.txt
### Keybase proof
I hereby claim:
* I am jacobq on github.
* I am jacobq (https://keybase.io/jacobq) on keybase.
* I have a public key ASBCStR5tBI73pYYyJPV117dkY1cIlCQGd_6q7bZbl8w-wo
To claim this, I am signing this object:
@jacobq
jacobq / electron-prep.sh
Last active Jan 9, 2020
Build electron from source
View electron-prep.sh
#!/bin/bash
ORIGINAL_DIR=${pwd}
# Optional caching step
#export GIT_CACHE_PATH="${HOME}/.git_cache"
#mkdir -p "${GIT_CACHE_PATH}"
# Use electron's build cache
export SCCACHE_BUCKET="electronjs-sccache-ci"
@jacobq
jacobq / index.html
Last active Jan 8, 2020
Repro of printToPDF problem in electron 8.0.0-beta.5 (Electron Fiddle Gist)
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
<!-- All of the Node.js APIs are available in this renderer process. -->
We are using Node.js <script>document.write(process.versions.node)</script>,
@jacobq
jacobq / index.js
Created Dec 20, 2019
csv-stringify context.header bug repro
View index.js
const { createWriteStream } = require('fs');
const intoStream = require('into-stream');
const csvStringify = require('csv-stringify');
const makePromise = () => {
let resolve;
let reject;
const promise = new Promise((resolve_, reject_) => {
resolve = resolve_;
reject = reject_;
View controllers.application.js
import Ember from 'ember';
const Foo = Ember.Object.extend({
array: [1,2,3]
});
const Bar = Foo.extend({
array: [2,3,4]
});
const Baz = Foo.extend({
//array: this._super.array.map(x => 1)
@jacobq
jacobq / index.html
Created Oct 30, 2019
Electron Fiddle Gist
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
<!-- All of the Node.js APIs are available in this renderer process. -->
We are using Node.js <script>document.write(process.versions.node)</script>,
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
init() {
this._super(...arguments);
this.set('foo', [1,2,3]);
},
actions: {
notifyParent() {
You can’t perform that action at this time.