Skip to content

Instantly share code, notes, and snippets.

View ottsch's full-sized avatar
🦌

ottsch ottsch

🦌
  • kulturinventur
  • Berlin, Germany
View GitHub Profile
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php
$('[placeholder]').focus(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
input.removeClass('placeholder');
}
}).blur(function() {
var input = $(this);
@luetkemj
luetkemj / wp-query-ref.php
Last active September 14, 2024 13:06
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@havvg
havvg / PdoDumper.php
Created August 10, 2012 16:41
PdoLoader as translation resource for Symfony2
<?php
namespace Ormigo\Bundle\TranslationBundle\Translation\Dumper;
use Ormigo\Bundle\TranslationBundle\Translation\Loader\PdoLoader;
use Symfony\Component\Translation\Dumper\DumperInterface;
use Symfony\Component\Translation\MessageCatalogue;
class PdoDumper extends PdoLoader implements DumperInterface
@vsubhash
vsubhash / com.vsubhash.js.facebook-posts-deleter
Last active September 17, 2018 01:24
"Facebook Posts Deleter 2018" script is a User Script to automatically delete Facebook posts one by one without any user intervention. Install this script in Firefox-based browsers (Firefox, Seamonkey, IceWeasel) using the Greasemonkey add-on. Then, go to your Facebook "Activity Log". This scripts was tested in Firefox 34. If you use a much diff…
// ==UserScript==
// @name Facebook Posts Deleter
// @namespace com.vsubhash.js.facebook-posts-deleter
// @description Deletes all facebook posts, one by one if browser is spoofed as Firefox 34
// @include https://www.facebook.com/*allactivity
// @exclude %exclude%
// @version 2018
// @grant none
// ==/UserScript==
@azlen
azlen / bulletpaths.js
Last active August 16, 2024 03:55
All Paths Lead to Roam
/*
* credit to Dhrumil Shah (@wandcrafting) and Robert Haisfield (@RobertHaisfield)
* for the original concept which was part of their RoamGames submission
* and can be found at: https://www.figma.com/file/5shwLdUCHxSaPNEO7pazbe/
*
*/
/* ======= OPTIONS ======== */
/* note: if you change these, reload the page to see the effect */
@artpi
artpi / roam_todo_exploder.js
Last active April 28, 2022 01:19
This will animate an "Explosion" whenever you complete a TODO in Roam Research, so you can be productive in style.
// This will animate an "Explosion" whenever you complete a TODO in Roam Research.
// See https://deliber.at/roam for more Roam goodies.
// Put this file under {{[[roam/js]]}} block. I have a page roam/js. Under that, I have {{[[roam/js]]}} and under that the javascript block
document.addEventListener("click", function ( e ) {
const target = e.target;
if (
target.tagName === "INPUT" &&
target.parentElement.className === "check-container"
) {
if (target.type === "checkbox" && target.checked ) {