Skip to content

Instantly share code, notes, and snippets.

View dmuth's full-sized avatar
💭
White Mage

Douglas Muth dmuth

💭
White Mage
View GitHub Profile
@dmuth
dmuth / DeleteGmailBulk.js
Last active February 17, 2016 20:00
Delete threads from your Gmail mailbox in bulk Raw
//
// Paste this function into the window at http://script.google.com/ and
// then click the triangle button in the menu bar to run it.
//
// After the script is finished running (which can take a minute or longer!),
// go to View -> Logs to view the logs of the script execution.
//
// Based off of a script I found at https://productforums.google.com/forum/#!topic/gmail/YeQVDuPIQzA
//
@dmuth
dmuth / gist:8165763
Created December 28, 2013 23:52
Some changes I made to the script found at http://jonathan-kim.com/2013/gmail-no-response Specifically: I added the ignoreThisSubject() and threadHasIgnoreLabel() functions.
/*
* This script goes through your Gmail Inbox and finds recent emails where you
* were the last respondent. It applies a nice label to them, so you can
* see them in Priority Inbox or do something else.
*
* To remove and ignore an email thread, just remove the unrespondedLabel and
* apply the ignoreLabel.
*
* This is most effective when paired with a time-based script trigger.
*
@dmuth
dmuth / gist:5695205
Created June 2, 2013 22:38
/etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
[dolph:~ ] $ curl -v http://64.121.64.153:8000/stream/1/
* About to connect() to 64.121.64.153 port 8000 (#0)
* Trying 64.121.64.153... connected
> GET /stream/1/ HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-apple-darwin10.7.0) libcurl/7.22.0 OpenSSL/1.0.1c zlib/1.2.7 libidn/1.22
> Host: 64.121.64.153:8000
> Accept: */*
>
ICY 401 Service Unavailable
icy-notice1:<BR>SHOUTcast Distributed Network Audio Server/win64 v2.0.0.29<BR>
@dmuth
dmuth / gist:1587038
Created January 10, 2012 04:54
Drupal shows "create content" menu item to anonymous users
<?php
/**
* From my blog post at:
*
* http://www.dmuth.org/node/1201/drupal-shows-create-content-menu-item-anonymous-users
*
*/
if (strstr($_SERVER["REQUEST_URI"], "/node/add")) {
@dmuth
dmuth / gist:1587034
Created January 10, 2012 04:52
How to secure a Drupal site
<?php
/**
*
* From my blog post at:
*
* http://www.dmuth.org/node/1202/how-secure-drupal-site
*
*/
$path = getenv("SCRIPT_URL");
<?php
/**
* This code is to load a chat created with Drupal's Chat Room module
* (http://drupal.org/project/chatroom) into a block.
* If implemented properly, users will be able to chat from any page
* on the site that displays this block.
*
* @author Douglas Muth <http://www.dmuth.org/>
*/