Skip to content

Instantly share code, notes, and snippets.

View David7ce's full-sized avatar
👋

David7ce David7ce

👋
View GitHub Profile
@brandon-rhodes
brandon-rhodes / build-overlay.py
Last active April 26, 2024 13:44
Script that builds a Google Earth overlay that projects the map of Tolkien’s Middle-earth atop modern Europe at the correct position and scale. Once the .kmz overlay file has been generated, simple open it using the File menu in Google Earth.
"""Project a map of Middle-earth on modern Europe.
Builds an `overlay.kmz` file in the current directory which should be
opened with Google Earth.
"""
import os
import urllib2
import zipfile
from math import cos, radians
@fomightez
fomightez / remove blank lines regex.md
Last active September 17, 2024 01:31
remove all blank lines using regular expressions
@lmmx
lmmx / opml2html.pl
Created December 3, 2015 15:22
OPML to HTML bookmarks file converter, via http://jeremy.zawodny.com/blog/archives/000386.html
#!/usr/bin/perl -w
#
# opml2html.pl, (c) Jeremy Zawodny -- http://jerermy.zawodny.com/blog/
#
# Updated by Michael Radwin (http://www.radwin.org/michael/blog/)
# on Dec 26th, 2003 to include image size attributes and link
# titles.
#
# You may distribute this code freely. It's not rocket science.
#
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active November 21, 2024 10:44
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@MartinAngeloni
MartinAngeloni / ahorcado.cs
Created August 31, 2017 16:43
Simulando el juego del ahorcado en c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AhorcadoPalabras;
namespace ahorcadoString
{
#!/bin/bash
## UNLICENSE file for license information
# Misc checks
if [ $(id -u) -ne 0 ]
then
echo "This script needs root to work." # It really does. We're installing packages.
exit 1
fi
@captainhook
captainhook / SpotifyWhitelist
Last active December 29, 2023 17:32
Spotify whitelist, Pi-hole compatible. Original source: https://github.com/x0uid/SpotifyAdBlock
# Spotify's Anti-Adveritsing blocking servers, tricking services to stop music services (DONT BLOCK THESE!):
gcdn.2mdn.net
r9---sn-n4v7kn76.c.2mdn.net
gew1-accesspoint-b-zzfg.ap.spotify.com
ns1.p23.dynect.net
ns3.p23.dynect.net
ns4.p23.dynect.net
dns1.p07.nsone.net
dns2.p07.nsone.net
dns3.p07.nsone.net
@kepano
kepano / obsidian-web-clipper.js
Last active November 14, 2024 04:15
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/[email protected]?module'), import('https://unpkg.com/@tehshrike/[email protected]'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@David7ce
David7ce / github-dg-actions.yml
Created November 6, 2023 18:52
Deploy Digital Garden to GitHub Pages with this workflow
name: GH Pages
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build: