Skip to content

Instantly share code, notes, and snippets.

View thebestsophist's full-sized avatar

Cordelia Yu thebestsophist

View GitHub Profile
@eloypnd
eloypnd / dnsmasq_setup_osx.md
Last active April 28, 2024 14:32
wildcard DNS record on OS X in localhost development with dnsmasq

wildcard DNS in localhost development

$ brew install dnsmasq
   ...
$ cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
  • edit /usr/local/etc/dnsmasq.conf
address=/local/127.0.0.1
@meetar
meetar / HOTQuickstart.md
Last active July 30, 2020 12:15
How to get started contributing to a Humanitarian OpenStreetMap task

##How to get started contributing to a Humanitarian OpenStreetMap Team task

###Overview

OpenStreetMap (OSM) is an open-source map of the world that anyone can edit. But like any map, it's incomplete.

The Humanitarian OpenStreetMap Team (HOT) helps organize people to improve the OSM map for crisis areas, mostly so aid workers can find their way around and make decisions about undermapped places. The data in these crisis areas is often very poor, or completely non-existent. Therefore any contribution you make at all will be a vast improvement, and could materially help people who are on the ground right now, looking at this data as you edit it, and deciding where to go and who to help.

There are many HOT tasks active at once. As of August 2014, the highest-priority tasks are Gaza and areas affected by the West African Ebola outbreak.

<script type="text/javascript">
// if user enters text in the Other text field, uncheck the fixed contribution radio buttons
function checkOther(form_in) {
var radioGrp = form_in.amount;
for (i = 0; i < radioGrp.length; i++) {
if (i != radioGrp.length - 1) { //the Other radio button must be the last one in the array
radioGrp[i].checked = false;
} else {
radioGrp[i].checked = true;
@wolverina
wolverina / user-stylesheet.css
Created October 26, 2013 15:20
Hide the worst of the web
/*fuck garbage*/
a[href^="http://bzfd.it"],
a[href^="http://buzzfeed.com"],
a[href^="http://www.buzzfeed.com"],
a[href^="http://huff.to"],
a[href^="http://huffingtonpost.com"],
a[href^="http://www.huffingtonpost.com"],
a[href^="http://gaw.kr"],
a[href^="http://gawker.com"],
a[href^="http://www.gawker.com"],
@nicoleslaw
nicoleslaw / 1_Tiny_Content_Framework.md
Last active January 23, 2024 02:28
Tiny Content Framework

Tiny Content Framework

About the project

This is a tiny content strategy framework focused on goals, messages, and branding. This is not a checklist. Use what you need and scrap the rest. Rewrite it or add to it. These topics should help you get to the bottom of things with clients and other people you work with.

Give me feedback on Twitter (@nicoleslaw) or by email (nicole@nicolefenton.com).

Contents

@oodavid
oodavid / README.md
Last active April 6, 2024 18:45 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@dsanson
dsanson / any2pandoc.sh
Created August 30, 2011 17:52
any2pandoc.sh: script that tries to convert documents thrown at it to pandoc's extended markdown
#!/bin/sh
# any2pandoc.sh
#
# A shell script that tries its best to convert documents thrown at it
# to pandoc's extended markdown.
#
# https://gist.github.com/1181510
#
# Depends on:
@brendo
brendo / EventTutorial.md
Created April 4, 2011 11:06
Symphony Events: A Detailed Look

Forms have been an integral part of any interactive site since the dawn of time, they promote interactivity and are usually the most common way users interact with a site. It's commonplace that when a form is submitted, the website will take 'action' and do something with the data and then provide a user with the result. Symphony provides this logic layer via Events.

This tutorial assumes you have a basic understanding of how Events work in Symphony (if not, this may be a good introduction) and are semi comfortable writing some PHP code. I'll be showing you some of the lesser known features of Symphony Events, including event priority, event chaining and a brief demonstration of how to write a custom Event. The difficulty level progresses as we go through, but with any luck you'll be able to learn a thing or two :)

Getting Started

The Scenario

Our client requires a form that allows a user to submit some details about their new car purchase. Th

#!/usr/bin/env ruby
# tumblr-backup.rb
# downloads posts and related info from your a tumblr blog
# and saves them to the filesystem
# in yaml format
# Requires Mark Wunsch's awesome tumblr gem : http://github.com/mwunsch/tumblr
require "rubygems"
require "tumblr"
require "yaml"