Skip to content

Instantly share code, notes, and snippets.

View r1w1s1's full-sized avatar
:octocat:

Ricardson (r1w1s1) r1w1s1

:octocat:
View GitHub Profile
@r1w1s1
r1w1s1 / new-wireguard-peer.sh
Created October 20, 2022 14:55 — forked from robinlandstrom/new-wireguard-peer.sh
Script to automatically add configration for a new peer to a wireguard server. It will then print a QR code to the console that can be used to add the config to the Android or OS X wireguard client.
#!/bin/bash
readonly INTERFACE="wg0"
# Generate peer keys
readonly PRIVATE_KEY=$(wg genkey)
readonly PUBLIC_KEY=$(echo ${PRIVATE_KEY} | wg pubkey)
readonly PRESHARED_KEY=$(wg genpsk)
# Read server key from interface
@r1w1s1
r1w1s1 / Jenkinsfile
Created June 13, 2022 14:20 — forked from merikan/Jenkinsfile
Some Jenkinsfile examples
Some Jenkinsfile examples
@r1w1s1
r1w1s1 / php5.6-pgsql.Dockerfile
Created June 8, 2018 17:14 — forked from ben-albon/php5.6-pgsql.Dockerfile
Docker PHP Image with PostgreSQL Driver
FROM php:5.6-apache
RUN apt-get update && apt-get install -y libpq-dev && docker-php-ext-install pdo pdo_pgsql
COPY src/ /var/www/html
@r1w1s1
r1w1s1 / Caddyfile
Created May 31, 2018 16:05 — forked from abiosoft/Caddyfile
Caddy wordpress docker-compose
:80
root /usr/src/wordpress
gzip
fastcgi / wordpress:9000 php
rewrite {
if {path} not_match ^\/wp-admin
to {path} {path}/ /index.php?_url={uri}
}
log stdout
errors stderr
@r1w1s1
r1w1s1 / .Xdefaults
Created March 30, 2018 17:11 — forked from ei-grad/.Xdefaults
My urxvt config.
!! Appearance
urxvt.termName: rxvt-unicode
urxvt.scrollBar: false
urxvt.background: black
urxvt.foreground: gray
!! Font prefferenes
urxvt.font: xft:DejaVu Sans Mono:pixelsize=13
urxvt.boldFont: xft:DejaVu Sans Mono:pixelsize=13:weight=bold
urxvt.letterSpace: -1
!! Larger history limit
@r1w1s1
r1w1s1 / function.js
Created March 6, 2018 01:28 — forked from vgeshel/function.js
AWS Lambda function for forwarding SNS notifications to Slack
console.log('Loading function');
const https = require('https');
const url = require('url');
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration
const slack_url = 'https://hooks.slack.com/services/...';
const slack_req_opts = url.parse(slack_url);
slack_req_opts.method = 'POST';
slack_req_opts.headers = {'Content-Type': 'application/json'};
@r1w1s1
r1w1s1 / tmux-cheatsheet.markdown
Created June 30, 2017 21:13 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@r1w1s1
r1w1s1 / output
Created January 10, 2017 19:07 — forked from halberom/output
ansible - using lookup to get a date timestamp into a variable
...
TASK: [debug var=mydate] ******************************************************
ok: [localhost] => {
"mydate": "20140605101824"
}
...