Skip to content

Instantly share code, notes, and snippets.

View plotti's full-sized avatar

Thomas Ebermann plotti

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@churro-s
churro-s / LetsEncrypt_HTTPS_SABnzbd.MD
Last active July 18, 2023 23:03
Setup Let's Encrypt certificate for use with SABnzbd+

I just discovered Let's Encrypt and wanted to get myself a free cert for use with my SABnzbd+ installation at home. Here's my setup:

  • Home server running Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-93-generic x86_64)
  • SABNzbd+ 0.7.16 running on server
  • Netgear Nighthawk R6900 home router
  • Dynamic hostname from no-ip.org, which I'll use for this setup

Preparation

I have a dynamic hostname from no-ip.org, which I use to access my home network. I have port forwarding set up on my Netgear router to access the programs running on my home server. See my port forwarding settings on my comment below.

@yrevar
yrevar / imagenet1000_clsidx_to_labels.txt
Last active July 21, 2024 08:16
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@magnusdahlstrand
magnusdahlstrand / gist:1923948
Created February 27, 2012 13:58
Remove all ._* and .AppleDouble-files
Remove ._*- and .AppleDouble-files from folders.
Adapted from Torkel's comment on http://hints.macworld.com/article.php?story=20021118060850652
Cred to hiber for suggesting adding -print0/-0 to solve whitespace issue.
See all ._*-files:
find . -name '._*' | more
Remove all ._*-files:
find . -name '._*' -print0 | xargs -0 rm
@bdcravens
bdcravens / split-csv-save-header.sh
Created January 2, 2012 05:44
Splits a folder of CSV files into smaller CSV files, retaining header row
#!/bin/bash
if [ ! -d "./backup" ]; then
mkdir backup
fi
lines=1024
for i in *.csv; do
split -l ${1:-$lines} $i ${i%.csv}-
for j in ${i%.csv}-a*; do
if [[ "$j" != *-aa ]]

Building a Facebook application with Rails and hosting it in Heroku

Introduction

Facebook has given a big step in simplicity with its Graph API and the creation of the Open Graph protocol, now more than ever it's easier to read and write data from and to the socalled social graph.

You could turn your webpage into a fully-featured Facebook-like page, just like if you were inside Facebook, you can give your users the ability to sign in with their Facebook credentials, customize your users' experience with parameters taken from their Facebook profiles, you could add a Like button to every object in your page as images, songs, articles, etc., tell your users which friends of theirs have liked your content, and a lot of things more, oh, I forgot to mention something, all of this with total ease. Yes, I know you could do it with Facebook Connect, but I said "with ease".