Skip to content

Instantly share code, notes, and snippets.

View askedrelic's full-sized avatar

Matt Behrens askedrelic

View GitHub Profile
@mcpar-land
mcpar-land / build.rs
Created June 29, 2023 05:34
add tailwind to rust build script
use std::process::Command;
fn main() {
let tailwind_cmd = "npx tailwindcss -i input.css -o assets/app.css";
if cfg!(target_os = "windows") {
Command::new("cmd").arg("/C").arg(tailwind_cmd).status()
} else {
Command::new("sh").arg("-c").arg(tailwind_cmd).status()
}
@annard
annard / Import Instapaper CSV.applescript
Last active September 20, 2019 20:29
Import Instapaper articles (exported as CSV from their site) using Numbers into DEVONthink Pro (Office). The web pages will be imported as PDF documents. The folder structure of Instapaper will be replicated in an "Instapaper" top level group for the currently open database.
-- Use Instapaper to export a CSV file of your articles.
-- Must have Numbers to open it in.
-- Will create PDF documents in /Instapaper/<your folder in Instapaper> groups.
-- Be sure to select an open database in DT Pro before you run this.
--
-- Created by Annard Brouwer, 24/08/2014
--
-- This program is free software released "as-is"; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
-- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-- Get a copy of the GNU General Public License by writing to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@kyledrake
kyledrake / ferengi-plan.txt
Last active April 6, 2024 00:30
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {
@juanje
juanje / Berksfile
Last active April 10, 2017 07:27
Simplified Vagrant config for setting up a logstash server with Chef solo
cookbook 'apt'
cookbook 'monit'
cookbook 'logstash', git: 'git://github.com/lusis/chef-logstash.git'
@Nurdok
Nurdok / python_conversion.md
Last active December 16, 2022 03:45
Python Conversion

Python Number Conversion Chart

From To Expression
@datagrok
datagrok / gist:2199506
Last active April 8, 2023 17:36
Virtualenv's `bin/activate` is Doing It Wrong
@chadselph
chadselph / webmaildebug.py
Created October 29, 2010 20:33
yet another tool for debugging emails your application is sending. This script accepts email as an SMTP server and lets you read the emails contents via http. It can use sqlite3 or a python list to save data.
import asyncore, asynchat
import email
import re
import smtpd
import sqlite3
import socket, string
import StringIO, mimetools
# HTTP based on examples at http://effbot.org/librarybook/asynchat.htm
class HTTPChannel(asynchat.async_chat):
@balinterdi
balinterdi / top_us_cities.html
Created September 2, 2010 15:09
Extract top US cities
<!-- taken from http://en.wikipedia.org/wiki/List_of_United_States_cities_by_population -->
<tr>
<td align="center">1</td>
<td><a href="/wiki/New_York_City" title="New York City">New York City</a></td>
<td><a href="/wiki/New_York" title="New York">New York</a></td>
<td align="right"><span style="display:none">&amp;0000000008391881.000000</span>8,391,881</td>
</tr>
<tr>
<td align="center">2</td>
<td><a href="/wiki/Los_Angeles" title="Los Angeles">Los Angeles</a></td>