Skip to content

Instantly share code, notes, and snippets.

@thegass
thegass / getalbums.js
Created Nov 16, 2019
get album urls from bandcamp-discography
View getalbums.js
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";
}
View gist:3daffcf085a45b6f5aade71450b4e21c
# .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 Dec 22, 2016
use expect (http://expect.sourceforge.net/) to autoconnect to checkpoint vpn (snx linux cli client)
View checkpointconnect.sh
#!/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 Mar 16, 2016
usefull vim-replacement commands f. typo3 upgrades
View gist:a1e911821e2bb5adaec8
:%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
View gist:d3d2e7af81d67e7aff55
### 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 Jul 2, 2015
save remove typo3temp/Cache/*
View gist:43d01abd16380a557381
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 Apr 16, 2015
sample how to force vagrant plugins.
View enforce 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 Jul 31, 2013
render og:image tag from typo3-dam-field.
View new_gist_file
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 Jul 1, 2013
upgrade all pre-1.7 repos to 1.7
View new_gist_file
find . -name .svn -type d -exec svn upgrade {}/../ \;