Skip to content

Instantly share code, notes, and snippets.

View chrisjung-dev's full-sized avatar
Coffee

Chris Jung chrisjung-dev

Coffee
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 ); ?>
@chrisjung-dev
chrisjung-dev / 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%;
@chrisjung-dev
chrisjung-dev / 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: {
@chrisjung-dev
chrisjung-dev / 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"]
},
@chrisjung-dev
chrisjung-dev / 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
@chrisjung-dev
chrisjung-dev / 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 );
});
@chrisjung-dev
chrisjung-dev / 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"
@chrisjung-dev
chrisjung-dev / piraten-mkk-flyer.svg
Created February 28, 2011 07:46
Flyer für MKK / Kreistagswahl
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.