Skip to content

Instantly share code, notes, and snippets.

View falloutphil's full-sized avatar

falloutphil

  • UK
View GitHub Profile
@tvieira
tvieira / myweechat.md
Created February 24, 2016 15:46 — forked from pascalpoitras/config.md
My always up-to-date WeeChat configuration (weechat-dev)

WeeChat Screenshot

Encrypted password in sec.conf

/secure passphrase <pass>
/secure set bncpass <pass>
/secure set relaypass <pass>
@falloutphil
falloutphil / 99-noto-mono-color-emoji.conf
Last active June 12, 2020 17:41 — forked from IgnoredAmbience/99-noto-mono-color-emoji.conf
Noto Emoji Color fontconfig for Konsole
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!--
Noto Mono + Color Emoji Font Configuration for KDE/Konsole
Konsole/KDE apps use QT rather than the GTK emoji setup. So standard Ubuntu setup doesn't seem to work.
https://bugs.launchpad.net/ubuntu/+source/kubuntu-meta/+bug/1767390
If you want the Snake emoji in your Python venv Powerline then see below!
@jmickela
jmickela / gist:7c383c78af66a37a2446fe7eb733b157
Last active August 14, 2020 14:34
Trying to get PhpStorm to use git in Bash on Ubuntu on Windows (Windows Subsystem for Linux)
There's a problem that you run into right away: you can't put a command line command, with arguments,
into the path to git executable box.
So putting something like bash.exe -c "git %*" isn't going to work. I wrote a small shell script that
fixes this, for both 32-bit and 64-bit systems.
@echo off
If %PROCESSOR_ARCHITECTURE% == x86 (
"C:\Windows\sysnative\bash.exe" -c "git %*"
) Else (
@13Cubed
13Cubed / update_dnsbl.sh
Last active October 23, 2020 06:55
Download DNS adware and malware blacklists in BIND format and add them to a blacklist zone file. This is a modified version of the script from Paul's Security Weekly (http://wiki.securityweekly.com/wiki/index.php/Episode472).
#!/bin/bash
HOME=/var/named
ADLISTURL="https://pgl.yoyo.org/adservers/serverlist.php?hostformat=bindconfig;showintro=0;mimetype=plaintext"
MWLISTURL="http://mirror1.malwaredomains.com/files/spywaredomains.zones"
ADLISTFILE=/tmp/adlistfile
MWLISTFILE=/tmp/mwlistfile
# Download newest blacklists
curl -s -o $ADLISTFILE $ADLISTURL
@gschueler
gschueler / basic-app.json
Last active November 5, 2020 18:46
Basic Rundeck aclpolicy, allows access to one project for one group
{
"description": "MyGroup allowed access to MyProject only",
"context": {
"application": "rundeck"
},
"for": {
"project": [
{
"match": {
"name": "MyProject"
@quanticle
quanticle / org-mode tips.md
Last active June 24, 2021 18:51
Org-mode Tips

Org Mode

  • To have org-mode expand everything by default: M-x customize-variable RET org-startup-folded
  • To insert code-blocks quickly: <s TAB
  • To insert a new bullet/number in the current list: M-RET
  • To promote a heading: M-<left arrow>
  • To demote a heading: M-<right arrow>
  • Hyperlinks:
    • To link to another org-mode file:
@phaneesh
phaneesh / log4j.properties
Created March 19, 2019 08:48
Rundeck log rotation
log4j.appender.cmd-logger=org.apache.log4j.RollingFileAppender
log4j.appender.cmd-logger.append=true
log4j.appender.cmd-logger.layout=org.apache.log4j.PatternLayout
log4j.appender.cmd-logger.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c - %m%n
log4j.appender.cmd-logger.File=/var/log/rundeck/command.log
log4j.appender.cmd-logger.rollingPolicy=org.apache.log4j.rolling.TimeBasedRollingPolicy
log4j.appender.cmd-logger.rollingPolicy.ActiveFileName=/var/log/rundeck/command.log
log4j.appender.cmd-logger.rollingPolicy.FileNamePattern=/var/log/rundeck/command-%d{yyyy-MM-dd}.log
log4j.appender.cmd-logger.MaxBackupIndex=7
@falloutphil
falloutphil / guix-qemu-ubuntu.org
Last active April 7, 2022 23:01
Running Ubuntu under Guix using QEmu, and then installing Cuis Smalltalk

There is no WSL or Multipass on Guix, but we can get the same thing with QEmu (and a lot more). But it’s a bit trickier to get started!

Guix packages required:

  • qemu (possibly can get away with minimal package)
  • cloud-utils (for cloud-localds)
  • cdrkit-libre (for genisoimage, used by cloud-localds)

Create the following user data file - there may be more in this than you need.

@meskarune
meskarune / weechat relay
Created September 14, 2015 18:05
weechat relay with ssl
mkdir ~/.weechat/ssl-cert
cd ~/.weechat/ssl-cert
openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -out relay.pem
In weechat:
/set relay.network.ssl_cert_key "/home/username/.weechat/ssl-cert/relay.pem"
/relay add ssl.weechat 9001
@gregsexton
gregsexton / gist:dd2d6c304d06fc3e6833
Created July 11, 2015 17:50
Company backend for completing eshell history
(defun company-eshell-history (command &optional arg &rest ignored)
(interactive (list 'interactive))
(cl-case command
(interactive (company-begin-backend 'company-eshell-history))
(prefix (and (eq major-mode 'eshell-mode)
(let ((word (company-grab-word)))
(save-excursion
(eshell-bol)
(and (looking-at-p (s-concat word "$")) word)))))
(candidates (remove-duplicates