Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Remove Blur-2xl
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Removes blur-2xl class from all elements
// @author You
// @match *://*/*
// @grant none
// @run-at document-idle
// ==UserScript==
@nappa32
nappa32 / Makefile
Created November 1, 2019 20:51 — forked from ryu1kn/Makefile
Encrypt/decrypt with AWS KMS using AWS cli
# How to encrypt/decrypt your text/blob secret with AWS KMS with AWS cli
KEY_ID=alias/my-key
SECRET_BLOB_PATH=fileb://my-secret-blob
SECRET_TEXT="my secret text"
ENCRYPTED_SECRET_AS_BLOB=encrypted_secret_blob
DECRYPTED_SECRET_AS_BLOB=decrypted_secret_blob # Result of decrypt-blob target
encrypt-text:
@nappa32
nappa32 / Terraform_functions.md
Created February 21, 2019 01:10 — forked from davewongillies/Terraform_functions.md
Terraform Functions

Supported built-in functions

  • abs(float) - Returns the absolute value of a given float. Example: abs(1) returns 1, and abs(-1) would also return 1, whereas abs(-3.14) would return 3.14. See also the signum function.

  • basename(path) - Returns the last element of a path.

  • base64decode(string) - Given a base64-encoded string, decodes it and returns the original string.

### Keybase proof
I hereby claim:
* I am nappa32 on github.
* I am nappa32 (https://keybase.io/nappa32) on keybase.
* I have a public key ASD_a7VnIEfJtlpqUsngCaquY6dzak3_dxnLwEVhkRD83Qo
To claim this, I am signing this object:
@nappa32
nappa32 / .bashrc-extensionfile-1
Created May 30, 2017 01:39
change remote for github to ssh from http
function githubssh ()
{
newremote=$(git remote -v|head -1 |sed 's/https:\/\/github.com\//[email protected]:/g'|awk '{print $2}');
git remote set-url origin $newremote
}
@nappa32
nappa32 / rake multitask
Created November 12, 2015 02:02
rake multitask example
task :task1 => [:big_db_task] do
sleep 1
puts "Task 1"
end
task :big_db_task do
puts "Big db task"
end
task :task3 => [:big_db_task] do
puts "Task 3"
end
@nappa32
nappa32 / nginx.conf
Last active August 29, 2015 14:19 — forked from Stanback/nginx.conf
server {
listen 80;
listen [::]:80;
server_name yourserver.com;
root /path/to/your/htdocs;
error_page 404 /404.html
index index.html;
class Sanitise
{
public function get($name, $filter, $options=null)
{
return $this->sanitise(INPUT_GET, $name, $filter, $options);
}
public function post($name, $filter, $options=null)
{
return $this->sanitise(INPUT_POST, $name, $filter, $options);
<?php
function get_param($key, $filter=FILTER_SANITIZE_STRING) {
if (!isset($_GET[$key])) {
return null;
}
return filter_var($_GET[$key], $filter);
}
function post_param($key, $filter=FILTER_SANITIZE_STRING) {
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'