Skip to content

Instantly share code, notes, and snippets.

View jibbius's full-sized avatar

Jack Barker jibbius

View GitHub Profile
javascript:(function(){var axureNodes = $axure.document.sitemap.rootNodes;var key = 'url';var normalisedAxureNodes = function getValues(obj, key) { var objects = []; for (var i in obj) { if (!obj.hasOwnProperty(i)) continue; if (typeof obj[i] == 'object') { objects = objects.concat(getValues(obj[i], key)); } else if (i == key) { objects.push(obj[i]); } } return objects;}(axureNodes, key);var myfilecontents = function buildTextFile(my_values){ var textfilecontents = ''; for (var i in my_values) { if(my_values[i] != '') textfilecontents += 'http://' + window.location.hostname + '/' + my_values[i] + '\n'; } return textfilecontents;}(normalisedAxureNodes);var url = 'data:text;charset=utf8,' + encodeURIComponent(myfilecontents);window.open(url, '_blank');window.focus();})();
#!/usr/bin/env python
##################################
# Simple Raspberry Pi Photo Booth
##################################
# (for a more advanced photo booth, visit: https://github.com/jibbius/raspberry_pi_photo_booth)
#Imports
from time import sleep
import os, datetime, errno, picamera
@jibbius
jibbius / picamera_sleep_demo.py
Created August 8, 2017 21:23
How to add a delay between the button press, and PiCamera taking a photo, using sleep().
from time import sleep
import RPi.GPIO as GPIO
import picamera
#... etc.
# Refer related gists, for how to setup the camera ...etc.
#Wait for someone to push the button
while True:
@jibbius
jibbius / camera.py
Last active April 28, 2018 06:17
Attempt to add sound to photo booth
#!/usr/bin/env python
#Imports
import datetime
import os
from time import sleep
from PIL import Image
import RPi.GPIO as GPIO
import picamera
@jibbius
jibbius / helpers.php
Last active January 5, 2021 00:38
name-directory/helpers.php
<?php
/**
* This file is part of the NameDirectory plugin for WordPress
*/
// I have only updated the name_directory_get_directory_names() function.
/**
* Get the names of given directory, maybe only with the char?
* @param $directory
@jibbius
jibbius / move_humble_downloads.ps1
Created September 23, 2023 22:22
Reorganise Humble Bundle Book downloads
# Step 1
# ------
# Open Powershell ISE
# - If you encounter permissions errors, Run as Administrator, then use the command:
# Set-ExecutionPolicy RemoteSigned
# Step 2
# ------
# Download everything using this FireFox plugin:
# - https://addons.mozilla.org/en-US/firefox/addon/humble-bundle-downloader/