Skip to content

Instantly share code, notes, and snippets.

View jpdicosola's full-sized avatar

John-Patrick Di Cosola jpdicosola

View GitHub Profile
@bnutz
bnutz / 01 pi-hole-vpn-combo_setup.md
Last active July 6, 2024 16:10
Installing Pi-Hole, Unbound and a WireGuard VPN server on a Raspberry Pi (via Docker)

Updated: 2022-07

Raspberry Pi-Hole VPN Setup

I wrote the first edition of this as a guide for myself at the end of 2017 - it was a mashup of Pi-Hole + PiVPN scripts and an IPsec script installed within a separate Raspian Docker image... and it actually worked!

But things have come a long way, and WireGuard happened - I've since streamlined and simplified my setup into a single Docker Compose script.

The steps below assume the following:

@C-Duv
C-Duv / 0.Notes.md
Created August 1, 2017 23:31
Example for Docker Swarm, Let's Encrypt and Nginx setup with no Nginx down time (answer to https://twitter.com/developius/status/892470102632923136)
@MichaelLawton
MichaelLawton / deleteAmazonSavedItems.js
Last active March 30, 2025 19:53
Removes all Amazon saved for later items on the cart page. It will only remove visible items. You might want to scroll first to make more items visible. To use paste code in developer console (Ctrl+Shift+J or Cmd+Opt+J in Chrome) then press enter.
function deleteSavedItems() {
var query = document.querySelectorAll("#sc-saved-cart input[value=Delete]")
if (query.length) {
query[0].click();
}
if (query.length > 1) {
setTimeout(deleteSavedItems,100);
}
else {
console.log('Finished');
@bagpack
bagpack / gist:cfb67fa31c8e5a863750
Created May 15, 2015 02:32
Twitter Kit For Android:Support media/upload
public class TwitterUploadClient {
private final String UPLOAD_ENDPOINT = "https://upload.twitter.com";
MediaService service;
final RestAdapter adapter;
TwitterUploadClient(TwitterAuthConfig authConfig, Session session, SSLSocketFactory sslSocketFactory, ExecutorService executorService) {
if(session == null) {
throw new IllegalArgumentException("Session must not be null.");
@alxjrvs
alxjrvs / gist:4b73771294ea25feb2f7
Last active August 29, 2015 14:06
Android-motion Gotchas!

#Two Gotcha's In the @RubyMotion getting started guide for Android

##The NDK Does not Support API level L I got this error when I tried to rake device for the first time.

ERROR! It looks like your version of the NDK does not support API level L. Switch to │  7       structure: Structure
a lower API level or install a more recent NDK.
@lisamelton
lisamelton / transcode-video.sh
Last active May 24, 2024 17:42
Transcode video file (works best with Blu-ray or DVD rip) into MP4 (or optionally Matroska) format, with configuration and at bitrate similar to popular online downloads.
#!/bin/bash
#
# transcode-video.sh
#
# Copyright (c) 2013-2015 Don Melton
#
about() {
cat <<EOF
$program 5.13 of April 8, 2015
@ermakovich
ermakovich / CultureInfoExtensions.cs
Last active December 21, 2015 01:39
Extension method for the Silverlight System.Globalization.CultureInfo class, that gets the ISO 639-2 three-letter code for the language of the current System.Globalization.CultureInfo object. It uses ISO-639-2 table (http://www.loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt), that is retrieved via Utils.GetResourceStream() custom method. The imp…
using System.IO;
namespace System.Globalization
{
public static class CultureInfoExtensions
{
/// <summary>
/// Gets the ISO 639-2 three-letter code for the language of the current System.Globalization.CultureInfo object.
/// </summary>
/// <param name="cultureInfo"></param>
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active March 27, 2025 08:16
A badass list of frontend development resources I collected over time.
@johanneswuerbach
johanneswuerbach / .travis.yml
Last active March 24, 2025 17:40
Deploy an iOS app to testflight using Travis CI
---
language: objective-c
before_script:
- ./scripts/travis/add-key.sh
after_script:
- ./scripts/travis/remove-key.sh
after_success:
- ./scripts/travis/testflight.sh
env:
global:
@ndarville
ndarville / business-models.md
Last active February 27, 2025 10:00
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google