Skip to content

Instantly share code, notes, and snippets.

@chemist
chemist / gpg-ssh-setup.md
Created December 24, 2021 05:26 — forked from mcattarinussi/gpg-ssh-setup.md
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.

@chemist
chemist / kubernetes_add_service_account_kubeconfig.sh
Created March 4, 2020 07:57 — forked from innovia/kubernetes_add_service_account_kubeconfig.sh
Create a service account and generate a kubeconfig file for it - this will also set the default namespace for the user
#!/bin/bash
set -e
set -o pipefail
# Add user to k8s using service account, no RBAC (must create RBAC after this script)
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
echo "usage: $0 <service_account_name> <namespace>"
exit 1
fi
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: your-namespace
namespace: your-namespace
rules:
- apiGroups:
- ""
resources:
- pods
#!/bin/bash
# URL = http://mac.pcbeta.com/viewthread.php?tid=118050&extra=
# run: sudo ./pd8_trialreset.sh
rm -rfd /Library/Preferences/Parallels
rm -rfd ~/Library/Preferences/Parallels
rm -rfd /private/var/.Parallels_swap
rm -rfd ~/Library/Preferences/com.parallels*
rm -rfd /private/var/db/Parallels
@chemist
chemist / gist:3766652
Created September 22, 2012 16:21 — forked from HasAndries/gist:3135128
angularjs directive for bootstrap datepicker : eternicode/bootstrap-datepicker, eyecon.ro
angular.module('bDatepicker', []).
directive('bDatepicker', function(){
return {
require: '?ngModel',
restrict: 'A',
link: function($scope, element, attrs, controller) {
var updateModel;
updateModel = function(ev) {
element.datepicker('hide');
element.blur();
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable, StandaloneDeriving #-}
module CloudTest where
import Remote
import Control.Applicative
import Control.Monad
import Control.Monad.Trans
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable, StandaloneDeriving, NamedFieldPuns #-}
module CloudTest where
import Remote
import Remote.Call
import Control.Applicative
import Control.Monad
import Control.Monad.Trans