Skip to content

Instantly share code, notes, and snippets.

Jesper graffen

Block or report user

Report or block graffen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ssl-patch.txt
--- old/lib/private/Settings/Admin/Additional.php 2018-04-03 14:18:20.163433827 +0000
+++ new/lib/private/Settings/Admin/Additional.php 2018-04-05 16:05:25.650363845 +0000
@@ -51,6 +51,7 @@
'mail_from_address' => $this->config->getSystemValue('mail_from_address', ''),
'mail_smtpmode' => $this->config->getSystemValue('mail_smtpmode', ''),
'mail_smtpsecure' => $this->config->getSystemValue('mail_smtpsecure', ''),
+ 'mail_smtpsecureselfsigned' => $this->config->getSystemValue('mail_smtpsecureselfsigned', true),
'mail_smtphost' => $this->config->getSystemValue('mail_smtphost', ''),
'mail_smtpport' => $this->config->getSystemValue('mail_smtpport', ''),
'mail_smtpauthtype' => $this->config->getSystemValue('mail_smtpauthtype', ''),
@graffen
graffen / qubes-broser-dispvm.sh
Created Jun 25, 2017
Run this in your Qubes AppVM to enable opening external links in a new DispVM
View qubes-broser-dispvm.sh
#! /bin/sh
# Create a handler opening urls in disposable VM
if [ ! -d "~/.local/share/applications" ]; then
mkdir ~/.local/share/applications
fi
cat >> ~/.local/share/applications/browser.desktop << EOF
[Desktop Entry]
Encoding=UTF-8
Name=BrowserVM
#Exec=qvm-open-in-vm untrusted %u
View lfs-prune.sh
git filter-branch --prune-empty --tree-filter '
git lfs track "*.zip"
git add .gitattributes
git ls-files -z | xargs -0 git check-attr filter | grep "filter: lfs" | sed -E "s/(.*): filter: lfs/\1/" | tr "\n" "\0" | while read -r -d $'"'\0'"' file; do
echo "Processing ${file}"
git rm -f --cached "${file}"
echo "Adding $file lfs style"
git add "${file}"
@graffen
graffen / post-receive
Last active Jan 4, 2017
Git post-receive hook for jekyll + publish to IPFS
View post-receive
#!/bin/bash -l
GIT_REPO=$HOME/graffen.dk.git
TMP_GIT_CLONE=$HOME/tmp/git
PUBLIC_WWW=$HOME/graffen.dk
git clone $GIT_REPO $TMP_GIT_CLONE
cd $TMP_GIT_CLONE
bundle exec jekyll build --source $TMP_GIT_CLONE --destination $PUBLIC_WWW
rm -Rf $TMP_GIT_CLONE
View adddkim.sh
#!/bin/bash
echo Generating DKIM setup for $1
mkdir -p /etc/opendkim/keys/$1
opendkim-genkey --directory=/etc/opendkim/keys/$1 -r -h rsa-sha256 -d $1
chown opendkim:opendkim /etc/opendkim/keys/$1/default.private
echo "default._domainkey.$1 $1:default:/etc/opendkim/keys/$1/default.private" >> /etc/opendkim/KeyTable
echo "$1 default._domainkey.$1" >> /etc/opendkim/SigningTable
echo "Done."
@graffen
graffen / start_ipfs.sh
Created Nov 29, 2016
Cron script file to keep ipfs running on my vps
View start_ipfs.sh
#!/bin/bash
if (( $(ps -ef | grep -v grep | grep "ipfs daemon" | wc -l) > 0 ))
then
echo "ipfs is running"
else
/usr/local/bin/ipfs daemon &
fi
@graffen
graffen / web.config
Created Nov 13, 2016
Web.config file for hosting reveal.js socket.io server on Azure
View web.config
<!--
This configuration file is required if iisnode is used to run node processes behind
IIS or IIS Express. For more information, visit:
https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/web.config
-->
<configuration>
<system.webServer>
<handlers>
<!-- indicates that the app.js file is a node.js application to be handled by the iisnode module -->
View boxstarter_projects.txt
Enable-MicrosoftUpdate
Install-WindowsUpdate -AcceptEula
### Browsers ###
cinst google-chrome-x64 -y
### Communication ###
cinst skype -y
### Utilities ###
View boxstarter.txt
### Set Time Zone ###
Write-BoxstarterMessage "Setting time zone to Romance Standard Time"
& C:\Windows\system32\tzutil /s "Romance Standard Time"
Install-WindowsUpdate -AcceptEula
cinst google-chrome-x64 -y
cinst skype -y
cinst 7zip -y
cinst filezilla -y
cinst gpg4win -y
View gpg.conf
#
# This is an implementation of the Riseup OpenPGP Best Practices
# https://help.riseup.net/en/security/message-security/openpgp/best-practices
#
#-----------------------------
# default key
#-----------------------------
You can’t perform that action at this time.