Skip to content

Instantly share code, notes, and snippets.

View thebopshoobop's full-sized avatar

Will Timpson thebopshoobop

View GitHub Profile
@thebopshoobop
thebopshoobop / PKGBUILD
Last active September 21, 2016 18:56
live-usb-install PKGBUILD updated to 2.5.11
# Submitter: andre.laszlo
# Maintainer: jooch
# Contributors: Florian Dejonckheere <florian@floriandejonckheere.be>, Jooch <jooch (at) gmx (dot) com>
pkgname=live-usb-install
pkgver=2.5.11
pkgrel=1
pkgdesc="LiveUSB Install - Create bootable usb sticks from a wide range of different Linux distributions"
url="http://live.learnfree.eu"
license=('GPL')
@thebopshoobop
thebopshoobop / live-usb-install.install
Created September 21, 2016 18:58
.install file to clean up *.pyc files on removal or upgrade of live-usb-install
pre_upgrade() {
/usr/bin/find /usr/share/live-usb-install -name \*.pyc -delete
}
post_remove() {
/usr/bin/find /usr/share/live-usb-install -name \*.pyc -delete
}
@thebopshoobop
thebopshoobop / PKGBUILD
Created January 14, 2017 04:40
tmuxp 1.2.4
# Maintainer: Artem Bezsmertnyi <artem.bezsmertny@gmail.com>
_author=tony
pkgname=tmuxp
pkgver=1.2.4
pkgrel=1
gitpkgver=v${pkgver}
pkgdesc="Manage tmux workspaces from JSON and YAML, pythonic API, shell completion."
arch=(any)
url="https://github.com/tony/tmuxp"
license=('BSD')
console.log(foo); // [Function: foo]
foo(); // 'bar'
function foo() {
console.log('bar');
}
console.log(baz); // undefined
baz(); // TypeError: baz is not a function
var baz = function() {
console.log('bar');
// This version throws a ReferenceError
function foo() {
console.log(x);
}
// These versions are equivalent and both log undefined
function bar() {
console.log(x);
var x = 'ZORG';
}
function baz() {
the_word = 'bird'
def foo():
print(the_word)
def baz():
print(the_word)
the_word = 'is too long'
foo() # 'bird'
baz() # UnboundLocalError: local variable 'the_word' referenced before assignment
var baz = 'yes';
if (true) {
var baz = 'no';
}
console.log(baz); // 'no'
let bar = 'yes';
if (true) {
let baz = 'no';
}
env = require("../env");
module.exports = {
"Load the site and save a screenshot": browser => {
browser
.url("http://www.vikingcodeschool.com")
.waitForElementVisible("body", 1000)
.saveScreenshot("./screenshots/1.jpg")
.click('a[href="/sign_in"')
.saveScreenshot("./screenshots/2.jpg")
const display = (res, items) => {
let lines = [];
items.forEach(item => {
lines.push("<hr>");
lines.push([`${item.name}: $${item.price}`]);
});
lines = lines.join("<br>");
res.writeHead(200, { "Content-Type": "text/html" });
res.end(lines);
};
const opts = {
most: () => [{}, {}, { sort: { price: -1 } }],
least: (most) => [{ category: most.category }, {}, { sort: { price: 1 } }],
sum: (most, least) => {
return [
[
{
$match: {
category: most.category,
_id: { $nin: [most._id, least._id] }