Skip to content

Instantly share code, notes, and snippets.

View Ardakilic's full-sized avatar

Arda Kılıçdağı Ardakilic

View GitHub Profile
@darekkay
darekkay / trakt-backup.php
Last active May 1, 2024 15:30
Trakt.tv backup script
<?php
/*
Backup script for trakt.tv (API v2).
Live demo: https://darekkay.com/blog/trakt-tv-backup/
*/
// create a Trakt app to get a client API key: http://docs.trakt.apiary.io/#introduction/create-an-app
$apikey = "CLIENT_API_KEY";
@joostrijneveld
joostrijneveld / gpg2qrcodes.sh
Created May 20, 2014 19:43
Producing printable QR codes for persistent storage of GPG private keys
# Heavily depends on:
# libqrencode (fukuchi.org/works/qrencode/)
# paperkey (jabberwocky.com/software/paperkey/)
# zbar (zbar.sourceforge.net)
# Producing the QR codes:
# Split over 4 codes to ensure the data per image is not too large.
gpg --export-secret-key KEYIDGOESHERE | paperkey --output-type raw | base64 > temp
split temp -n 4 IMG
for f in IMG*; do cat $f | qrencode -o $f.png; done
@nicktoumpelis
nicktoumpelis / repo-rinse.sh
Created April 23, 2014 13:00
Cleans and resets a git repo and its submodules
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive
@chappy84
chappy84 / cloudflare_dyn_dns.sh
Last active October 29, 2023 11:10
CloudFlare Dynamic DNS Shell Script
#!/bin/sh
#
# CloudFlare Dynamic DNS
#
# Updates CloudFlare records with the current public IP address
#
# Takes the same basic arguments as A/CNAME updates in the CloudFlare v4 API
# https://www.cloudflare.com/docs/client-api.html#s5.2
#
# Use with cron jobs etc.
@canerbasaran
canerbasaran / js-rastgele-tc-no.html
Last active November 19, 2022 09:00
Rastgele TC Kimlik No Üreticisi (javascript)
<!--
Rastgele TC Kimlik No Üreticisi
Random Turkish Identification Number Generator
https: //github.com/CanerBasaran
-->
<html><p id="tc"></p>
<script type="text/javascript">
var tcno = "" + Math.floor(900000001 * Math.random() + 1e8),
list = tcno.split("").map(function(t) {
return parseInt(t, 10)
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #

Backing up a GPG private key to a QR code

Use at your own risk! As with any backup method, test out your backup by restoring from it before you trust it.

  1. Install qrcode to generate the QR code:

     pip install qrcode
    
  2. Export the key, piping the output to qr, and save this to a png file:

@niksumeiko
niksumeiko / git.migrate
Last active April 30, 2024 12:54
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@ohhdemgirls
ohhdemgirls / vidble.sh
Created January 20, 2014 02:49
Simple Vidble.com Album Downloader
#!/bin/bash
id="$1"
host="http://vidble.com/album/"
mkdir "$id"
wget -nv -O - "$host$id" |grep -e "<img src='" |grep -Eo '/[^" ]+(jpg|jpeg|JPG|GIF|gif|PNG|png)' |sed -e 's/_med//' -e 's@^@http://vidble.com@' > $id/links.txt
sed -i '/logo/d' $id/links.txt
wget -i $id/links.txt -P $id
@thoop
thoop / nginx.conf
Last active December 8, 2023 21:55
Official prerender.io nginx.conf for nginx
# Change YOUR_TOKEN to your prerender token
# Change example.com (server_name) to your website url
# Change /path/to/your/root to the correct value
server {
listen 80;
server_name example.com;
root /path/to/your/root;
index index.html;