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 May 20, 2023 09:31
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)
@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 June 13, 2024 10:59
A badass list of frontend development resources I collected over time.
@johanneswuerbach
johanneswuerbach / .travis.yml
Last active May 14, 2024 03:50
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 January 13, 2024 17:27
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
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active June 20, 2024 14:04
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'