Skip to content

Instantly share code, notes, and snippets.

@thegass
thegass / getalbums.js
Created November 16, 2019 19:28
get album urls from bandcamp-discography
var x = document.querySelectorAll("li.music-grid-item > a:nth-child(1)");
var i, text="";
for (i = 0; i < x.length; i++) {
text += x[i] + "\n";
}
# .config/i3/config
set $mod Mod4
set $alt Mod1
font pango:Segoe UI 8
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# class border backgr. text
@thegass
thegass / checkpointconnect.sh
Created December 22, 2016 08:00
use expect (http://expect.sourceforge.net/) to autoconnect to checkpoint vpn (snx linux cli client)
#!/usr/bin/env expect
set username your_vpn_username
set pass your_vpn_passwort
set host your.vpn.server
spawn snx -s ${host} -u ${username}
expect "Please enter your password:" { send "${pass}\r" }
interact
@thegass
thegass / gist:a1e911821e2bb5adaec8
Last active March 16, 2016 09:59
usefull vim-replacement commands f. typo3 upgrades
:%s/t3lib_div/\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility/g
:%s/t3lib_extMgm/\\TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility/g
:%s/Tx_Extbase_Utility_Extension/\\TYPO3\\CMS\\Extbase\\Utility\\ExtensionUtility/g
### Keybase proof
I hereby claim:
* I am thegass on github.
* I am ssag (https://keybase.io/ssag) on keybase.
* I have a public key whose fingerprint is E2CF 14AA 8A81 E671 F787 4F19 4057 A6A0 11D3 3FA5
To claim this, I am signing this object:
@thegass
thegass / gist:43d01abd16380a557381
Created July 2, 2015 14:10
save remove typo3temp/Cache/*
for DIR in $(ls typo3temp/Cache); do
mv typo3temp/Cache/${DIR} typo3temp/Cache/${DIR}_old && rm -rf typo3temp/Cache/${DIR}_old && mkdir typo3temp/Cache/${DIR};
done
@thegass
thegass / enforce Vagrant-Plugins
Created April 16, 2015 14:03
sample how to force vagrant plugins.
# enforce mandatory plugins
plugins = {
'vagrant-hostmanager' => nil,
'vagrant-vbguest' => nil
}
plugins.each do |plugin, version|
unless Vagrant.has_plugin? plugin
error = "The '#{plugin}' plugin is not installed! Try running:\nvagrant plugin install #{plugin}"
error += " --plugin-version #{version}" if version
@thegass
thegass / new_gist_file
Created July 31, 2013 09:00
render og:image tag from typo3-dam-field.
40 = IMG_RESOURCE
40 {
file {
import.cObject = USER
import.cObject {
userFunc=tx_dam_tsfe->fetchFileList
refField= pages_opengraph_image
refTable= pages
refUid = TSFE:id
listNum = 0
@thegass
thegass / new_gist_file
Created July 1, 2013 14:09
upgrade all pre-1.7 repos to 1.7
find . -name .svn -type d -exec svn upgrade {}/../ \;