Skip to content

Instantly share code, notes, and snippets.

View campino2k's full-sized avatar

Chris Jung campino2k

View GitHub Profile
<?php
/**
* Template: element-activepage.php
*
* Available data: $element_id, $type, $id, $name, $classes, $description, $required, $answers, $response, $extra_attr, $response_year, $response_month, $response_day, $years, $months, $days
*/
?>
<div class="<?php echo esc_attr( implode( ' ', $classes ) ); ?>">
<?php do_action( 'torro_element_start', $element_id ); ?>
@campino2k
campino2k / gist:8b649b158f7c993d9745
Last active February 27, 2016 14:52
Uberspace Let's Encrypt
DOMAIN=$(ls ~/.config/letsencrypt/live/ | head -n 1)
uberspace-add-certificate -k ~/.config/letsencrypt/live/${DOMAIN}/privkey.pem -c ~/.config/letsencrypt/live/${DOMAIN}/cert.pem
cat >> ${HOME}/.config/letsencrypt/cli.ini <<__EOF__
# To prevent being forced to agree manually to the terms
agree-dev-preview = True
agree-tos = True
<div class="loading-bar"></div>
<style>
.loading-bar {
display: none;
opacity: 0;
position: absolute;
top: 0;
width: 100%;
@campino2k
campino2k / userscript.js
Created August 29, 2013 14:18
Add basic collase to code-blocks
jQuery(document).ready(function(){
/*
Needs refinement
* at the moment, even oneliners get height 10px and will be smaller
after being clicked
* there is no clue for users that clicking will expand/collapse code sections
*/
jQuery('pre').css({height:'10em'}).toggle(
/*global module:false*/
module.exports = function(grunt) {
// Initialisiert Grunt mit den folgenden Projekteinstellungen
grunt.initConfig({
//pkg: grunt.file.readJSON('package.json'),
less: {
dev: {
options: {
@campino2k
campino2k / Gruntfile.js
Created January 2, 2013 12:07
Gruntfile with watch and less
/*global module:false*/
module.exports = function(grunt) {
// Initialisiert Grunt mit den folgenden Projekteinstellungen
grunt.initConfig({
less: {
development: {
options: {
paths: ["less"]
},
@campino2k
campino2k / stopWatch.html
Created August 9, 2012 22:00
Stoppuhr-Script
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<!--
Copyright 2012 Christian Jung
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
@campino2k
campino2k / reload-dw-page.js
Created July 6, 2012 08:40
reloading script for DokuWiki
$(function){
loader = setInterval( function(){
jQuery('#bodyContent').load( window.location.href + '#bodyContent>*' );
/*
* use '#bodyContent>*' selector for getting just the contents of #bodyContent
* but not the #bodyContent itself
* in addition: this will strip the script element as well, since we use a selector ;-)
*/
}, 300000 );
});
@campino2k
campino2k / tunneled_chrome.sh
Created September 13, 2011 19:13
Tunnel Chrome via ssh session without tty
#! /bin/bash
ssh -fC2 -D 9000 -N user@host && google-chrome --proxy-server="socks5://localhost:9000"
@campino2k
campino2k / piraten-mkk-flyer.svg
Created February 28, 2011 07:46
Flyer für MKK / Kreistagswahl
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.