Skip to content

Instantly share code, notes, and snippets.

View artlung's full-sized avatar
💭
🤖

Joe Crawford artlung

💭
🤖
View GitHub Profile
@artlung
artlung / StructToQueryString.cfm
Created October 11, 2010 14:22
StructToQueryString() ColdFusion
<!---
<cfset submit_URL = StructNew()>
<cfset submit_URL.something = 1>
<cfset submit_URL.something2 = 2>
<cfset submit_URL.other = "hello world">
<cfoutput>
#StructToQueryString(Submit_URL)#
</cfoutput>
@njh
njh / musicbrainz-twitter.sql
Created September 8, 2011 21:31
Twitter accounts in MusicBrainz
COPY (SELECT artist.gid, artist_name.name, url.url FROM url
JOIN l_artist_url ON (url.id = l_artist_url.entity1)
JOIN artist ON (artist.id = l_artist_url.entity0)
JOIN artist_name ON (artist_name.id = artist.name)
WHERE url LIKE '%twitter.com%') TO STDOUT WITH CSV;
891abb2e-0156-411b-bf60-f4104e71ddfa,SMiLE.dk,http://twitter.com/smiledkmusic
aead4c74-d7e1-4960-8cec-bacb86617924,Triobelisk,http://twitter.com/triobelisk
89bf7e7f-34ef-4d91-a4f2-4f2bfe8c5c67,Freeze The Atlantic,http://twitter.com/fta_band
@boogah
boogah / WordPress_Unicode_Fix.sql
Last active October 14, 2016 08:11
Run this when you see weird crap in your posts/comments after moving your WordPress install.
update wp_posts set post_content = replace(post_content,'’','\'');
update wp_posts set post_title = replace(post_title,'’','\'');
update wp_comments set comment_content = replace(comment_content,'’','\'');
update wp_postmeta set meta_value = replace(meta_value,'’','\'');
update wp_posts set post_excerpt = replace(post_excerpt,'’','\'');
update wp_posts set post_content = replace(post_content,'…','...');
update wp_posts set post_title = replace(post_title,'…','...');
update wp_comments set comment_content = replace(comment_content,'…','...');
update wp_postmeta set meta_value = replace(meta_value,'…','...');
@alexkingorg
alexkingorg / wp-editor-char-count.php
Created January 16, 2012 18:43
Character counter for WordPress editor
<?php
// handy if you write status posts and send them to Twitter
function akv3_editor_char_count() {
?>
<script type="text/javascript">
(function($) {
wpCharCount = function(txt) {
$('.char-count').html("" + txt.length);

I'm writing in response to events that have recently come to light involving a sexual assault at a tech conference. Background information can be found [here][1], [here][2], and [here][3] as well as on twitter and google.


I've been watching this from the sidelines, and I've been wrestling with several questions that I can't seem to shake and that I really don't have answers to.

I wear many hats, both in the tech community and others. I'm a coder, a speaker, a user group organizer, a conference organizer, and even a boss. Each of those roles colors how I see this, but there's one role that is overpowering in my reaction.

See, I'm a Dad. A dad of two beautiful and innocent girls who are 3 and 2. They have their whole lives in front of them and so the questions I'm struggling with are:

@JeffreyWay
JeffreyWay / gist:1525217
Created December 27, 2011 21:29
Instant Server for Current Directory
alias server='open http://localhost:8000 && python -m SimpleHTTPServer'
@boogah
boogah / changelog.md
Last active April 6, 2021 14:25
DMCA Takedown Template Originally adapted from: http://www.epicorg.com/sample-dmca-take-down-notice.html
<!--
In Vue, we use v-model for all form bindings, while
Knockout maintains separate binding types, such as
textInput, checked, and options. In some cases,
such as for an input of type "range", Knockout
simply doesn't have an equivalent two-way binding
helper and the more verbose value and valueUpdate
must be used.
-->
<div id="app">
@sgomes
sgomes / functions.scss
Last active September 27, 2022 12:36
[Using Sass to automatically pick text colors] #4 - step 2
/**
* Calculate the luminance for a color.
* See https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests
*/
@function luminance($color) {
$red: nth($linear-channel-values, red($color) + 1);
$green: nth($linear-channel-values, green($color) + 1);
$blue: nth($linear-channel-values, blue($color) + 1);
@return .2126 * $red + .7152 * $green + .0722 * $blue;