View generatePassword.php
This file contains 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
<?php | |
// usage: $newpassword = generatePassword(12); // for a 12-char password, upper/lower/numbers. | |
// functions that use rand() or mt_rand() are not secure according to the PHP manual. | |
function getRandomBytes($nbBytes = 32) | |
{ | |
$bytes = openssl_random_pseudo_bytes($nbBytes, $strong); | |
if (false !== $bytes && true === $strong) { | |
return $bytes; | |
} |
View qgis-getstreetfromaddress.py
This file contains 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
from qgis.core import * | |
from qgis.gui import * | |
@qgsfunction(args='auto', group='Custom', referenced_columns=[]) | |
def getstreetfromaddress(value1, feature, parent): | |
parts = value1.split() | |
parts.pop(0) # Ignore the first bit (i.e. "123" in "123 N MAIN ST") | |
parts = map(formatstreetname, parts) | |
return " ".join(parts) |
View controller.php
This file contains 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
<?php | |
//.. | |
function editAction(){ | |
$form = $this->createForm(new Forms\UserType($userConfig), $user); | |
$form->handleRequest($request); | |
if($form->isValid()) { | |
$em = $this->getDoctrine()->getManager(); |
View cylon.sh
This file contains 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
led0path=/sys/class/leds/$SOME_LED_HERE/brightness | |
led1path=/sys/class/leds/$SOME_LED_HERE/brightness | |
led2path=/sys/class/leds/$SOME_LED_HERE/brightness | |
run=1 | |
led=0 | |
up=1 | |
minled=0 |
View gist:b980f22b9b2c47935628
This file contains 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
11:31 AM <LesaraRose> Sorry. I have a lot of questions lol | |
11:33 AM <TheWill> hardest: inspiring volunteers. work: being everybody's surrogate parent because they were ~20yo and antisocial and didn't know how to avoid generating a storm of drama everywhere they go | |
11:34 AM <TheWill> the idea of "everybody contributes towards the common good" is great until you're dealing with people who can't resolve the "who washes the dishes" conflict with their roommate | |
11:35 AM <TheWill> in other words a balance of demographics is vastly superior even if less comfortable | |
11:36 AM <TheWill> having a paid community manager is in my opinion the most effective way to reduce drama | |
11:36 AM <TheWill> and burnout | |
11:40 AM <myself> Hardest: Getting our external image to reflect the diversity of stuff actually happening in the space. Our technical people get more attention than our artistic people, so it takes a lot of work to bring in more artistic people. Yet, when we take both technical and artistic projects to show off at an e |
View chimera-bylaws.txt
This file contains 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
Bylaws of | |
Chimera Art Space | |
Article 1 - Offices | |
Section 1. Principal Office | |
The principal office of the corporation is located in Sonoma County, State of California. | |
Section 2. Change of Address | |
The designation of the county or state of the corporation's principal office may be changed by amendment of these bylaws. The board of directors may change the principal office from one location to another within the named county by noting the changed address and effective date below, and such changes of address shall not be deemed, nor require, an amendment of these bylaws: |
View asterisk-logfile-analyzer.php
This file contains 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
<?php | |
/* Cheap and Dirty Asterisk Logfile Analysis | |
* by Will Bradley, http://willbradley.name | |
* Released to the public domain, 6-26-2012 | |
* | |
* To install, modify the $dbname and other variables, | |
* create the MySQL database, user, and permissions, | |
* and double-check the asterisk logfile paths/formats below. | |
* This is a very cheap script, use at your own risk! | |
* |
View rgb-hsv-conversion.php
This file contains 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
<?php | |
// note: some of these are written with $this so they work inside classes. | |
// you could easily rewrite this to be a general function outside a class. | |
// sorry for the inconsistent tabs | |
// adapted from: http://www.actionscript.org/forums/showthread.php3?t=50746 via http://stackoverflow.com/questions/1773698/rgb-to-hsv-in-php | |
class MyClass | |
{ | |
// usage: $this->hexColorMod("#aa00ff", -0.2); // darker by 20% | |
// returns: #8700cc |
View dynamic-thermometer.html
This file contains 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
<!doctype> | |
<html> | |
<head> | |
<script type="text/javascript"> | |
var sheetPublicWebUrl = "https://docs.google.com/spreadsheets/d/e/2PACX-1vSbdn0eDQHBJuC3X8C4Lrmgwsomj5c4K-5x8ROhCkylVNeA5dtCq59wavQcgzmGt8qplXgUBHq-NZEj/pub?gid=0&single=true&range=b1&output=csv" | |
var req = new XMLHttpRequest(); | |
req.open('GET', sheetPublicWebUrl, true); | |
req.onload = function() { | |
result = req.responseText; |
View detect_signal.grc
This file contains 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
<?xml version='1.0' encoding='utf-8'?> | |
<?grc format='1' created='3.7.11'?> | |
<flow_graph> | |
<timestamp>Tue May 21 15:46:50 2019</timestamp> | |
<block> | |
<key>options</key> | |
<param> | |
<key>author</key> | |
<value></value> | |
</param> |
NewerOlder