Skip to content

Instantly share code, notes, and snippets.

@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active July 11, 2024 10:06
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh keys
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>"
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <rob@rob.tn>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network
@craigew
craigew / pom.xml
Created September 22, 2013 11:56
Example of profiles for dev and release
<profiles>
<profile>
<id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.liquibase</groupId>
@indraniel
indraniel / tar-gz-reader.go
Created February 23, 2015 19:05
Reading through a tar.gz file in Go / golang
package main
import (
"archive/tar"
"compress/gzip"
"flag"
"fmt"
"io"
"os"
)
@crisidev
crisidev / grafana-dashboard-exporter
Created October 7, 2015 20:35
Command to export all grafana 2 dashboard to JSON using curl
KEY=XXXXXXXXXXXX
HOST="https://metrics.crisidev.org"
mkdir -p dashboards && for dash in $(curl -k -H "Authorization: Bearer $KEY" $HOST/api/search\?query\=\& |tr ']' '\n' |cut -d "," -f 5 |grep slug |cut -d\" -f 4); do
curl -k -H "Authorization: Bearer $KEY" $HOST/api/dashboards/db/$dash > dashboards/$dash.json
done
@mickdekkers
mickdekkers / skypestatus.ahk
Created May 27, 2016 16:39
Change your Skype status programmatically
#NoEnv
#NoTrayIcon
#SingleInstance ignore
; The path to Skype's executable
skypePath := "C:\Program Files (x86)\Skype\Phone\Skype.exe"
; Used to identify Skype's main window
skypeWin := "ahk_exe Skype.exe ahk_class tSkMainForm"
; The X coordinate of all the status buttons
statusXCoord := 56
@DianaEromosele
DianaEromosele / Change "origin" of your GIT repository
Created August 7, 2016 00:31
Change "origin" of your GIT repository
$ git remote rm origin
$ git remote add origin git@github.com:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master

PS2 BIOS/ROM Contents

Here is an overview of what is contained in a PS2 ROM (including TOOL, DESR/PSX, ps2emu/ps2gxemu/ps2softemu (PS3), System 246 and System 256).
An updated version is available here: https://www.psdevwiki.com/ps2/index.php?title=Bios

Outdated information! ## Contributors SP193

Files

@odarriba
odarriba / OpenVPN on Docker and Raspberry Pi.md
Last active March 12, 2024 15:13
How to install OpenVPN with Docker on Raspberry Pi

First of all, we are going to store all the data in a Docker shared volume, called openvpn_data.

To initialise the OpenVPN configuration and CA:

$ docker run -v openvpn_data:/etc/openvpn --rm evolvedm/openvpn-rpi ovpn_genconfig -u udp://your-vpn.address.com
$ docker run -v openvpn_data:/etc/openvpn --rm -it evolvedm/openvpn-rpi ovpn_initpki

To start daemon (and auto-restart it):

@scottopell
scottopell / fix_exfat_drive.md
Last active July 13, 2024 15:37
Fix corrupted exFAT disk macOS/OSX

exFAT support on macOS seems to have some bugs because my external drives with exFAT formatting will randomly get corrupted.

Disk Utility is unable to repair this at first, but the fix is this:

  1. Use diskutil list to find the right drive id.
  2. You want the id under the IDENTIFIER column, it should look like disk1s1
  3. Run sudo fsck_exfat -d <id from above>. eg sudo fsck_exfat -d disk1s3
  4. -d is debug so you'll see all your files output as they're processed.
  5. Answer YES if it gives you the prompt Main boot region needs to be updated. Yes/No?
public class AudioManager : MonoBehaviour {
// Your audio clip
public AudioClip MusicClip;
// the component that Unity uses to play your clip
public AudioSource MusicSource;
// Use this for initialization
void Start () {