Skip to content

Instantly share code, notes, and snippets.

View techmagus's full-sized avatar
💭
🇵🇭

Yohan Yuki Xieㆍ사요한・謝雪矢 techmagus

💭
🇵🇭
View GitHub Profile
@mcattarinussi
mcattarinussi / gpg-ssh-setup.md
Last active May 4, 2024 06:01
A setup guide to use a personal gpg key for ssh authentication

GPG - SSH setup

Generating the master key

Here we create the master key. We want only Certify capability: we use the master key only to create the subkeys, Sign - Encrypt - Authenticate capabilities will be assigned to the subkeys.

Run the following command to start the master key generation process. Select the set your own capabilities creation process (type 8)

  ▶ gpg --full-generate-key --expert

gpg (GnuPG) 2.2.9; Copyright (C) 2018 Free Software Foundation, Inc.

@bagder
bagder / trrprefs.md
Last active December 27, 2022 05:17
This once held TRR prefs. Now it has moved.

NOTE

This content has moved.

Please go to bagder/TRRprefs for the current incarnation of the docs, and please help us out polish and maintain this documentation!

#!/usr/bin/php
<?php
declare(strict_types = 1);
// require_once ('hhb_.inc.php');
hhb_init ();
if ($argc !== 3) {
fprintf ( STDERR, "usage: %s timestamp url\n", $argv [0] );
fprintf ( STDERR, "example: %s 20091012061648 http://www.p4w.se\n", $argv [0] );
die ( 1 );
}
@Pulimet
Pulimet / AdbCommands
Last active May 4, 2024 04:56
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@techmagus
techmagus / keybase.md
Last active June 3, 2017 07:54
Keybase verification

Keybase proof

I hereby claim:

  • I am techmagus on github.
  • I am yukino (https://keybase.io/yukino) on keybase.
  • I have a public key whose fingerprint is CDB7 5E8E 8397 0FE2 8887 A05A DF3B 8EBF D250 A680

To claim this, I am signing this object:

@revelt
revelt / Hugo — Replace dashes on taxonomy terms
Created June 19, 2016 06:04
When your Hugo taxonomy term consists of multiple words, it will be shown with dashes. Here's how to restore spaces.
<a href="/categories/{{ $name | urlize }}">{{ replace $name "-" " " }}</a>
@d1manson
d1manson / BlobWorker.js
Last active June 27, 2018 11:28
Using an HTML5 Blob, you can get around the same-origin security restriction for Web Workers. The only slight complication is the need to return a Worker-like interface synchrounously. But this is actually fairly simple. Requires jQuery $ for ajax call. IE doesn't permit making workers from blob-urls, but other browsers do.
Worker = (function(){
var nativeWorker = Worker;
var BlobWorker = function(){
this.queuedCallList = [];
this.trueWorker = null;
this.onmessage = null;
}
BlobWorker.prototype.postMessage = function(){
if(this.trueWorker)
@andrewlkho
andrewlkho / gist:7373190
Last active March 25, 2024 03:37
How to use authentication subkeys in gpg for SSH public key authentication

GPG subkeys marked with the "authenticate" capability can be used for public key authentication with SSH. This is done using gpg-agent which, using the --enable-ssh-support option, can implement the agent protocol used by SSH.

Requirements

A working gpg2 setup is required. It may be possible to use gpg 1.4 but with gpg-agent compiled from gpg2. If you are using OS X 10.9 (Mavericks) then you may find the instructions [here][1] useful.

@jdevalk
jdevalk / gist:5623050
Created May 21, 2013 20:39
Redirect script sample NGINX code. Make sure this location line sits above the "location /" code in your NGINX config.
location /redirect/ {
rewrite ^/redirect/(.*)$ /redirect/index.php?id=$1 last;
}