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 |
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
import qgis.core | |
import qgis.gui | |
import re | |
# | |
# This will keep street names like SR 574A as SR 574A however | |
# will lowercase other number-digit suffixes with <2 or >4 numbers | |
# or >1 suffix-letters, like 12th Street or 243rd Ave. | |
# |
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
require "openssl" | |
require "base64" | |
require "digest/md5" | |
require "net/http" | |
class String | |
def esc | |
CGI.escape(self).gsub("%7E", "~").gsub("+", "%20") | |
end | |
end |
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; | |
} |
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(); |
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 |
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 |
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: |
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! | |
* |
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; |
NewerOlder