Skip to content

Instantly share code, notes, and snippets.

View bobdenotter's full-sized avatar
🛠️
"Design is how it works, not how it looks."

Bob den Otter bobdenotter

🛠️
"Design is how it works, not how it looks."
  • Two Kings
  • The Hague, Netherlands
View GitHub Profile
cacheMaxAge: 30
itemAmount: 1
feeds:
derekrethans:
name: "Derick Rethans"
title: "Derick Rethans' blog'"
url: "http://derickrethans.nl/"
feed: "http://derickrethans.nl/feed-php.xml"
@bobdenotter
bobdenotter / gist:0b66d5ffbaa2eafd90c7
Created August 16, 2014 14:38
patch command line commands
https://gist.githubusercontent.com/bobdenotter/beef4d430dc025816964/raw/e1ef58ed3dee1a96de73dba6a09878590154370b/symfony-form-validator-2.5.3.patch
patch -p1 < symfony-form-validator-2.5.3.patch
### Keybase proof
I hereby claim:
* I am bobdenotter on github.
* I am bopp (https://keybase.io/bopp) on keybase.
* I have a public key whose fingerprint is 8A7F 688A FF4A 6389 8B7E 2607 DC3B 4CD3 5D01 4678
To claim this, I am signing this object:
@bobdenotter
bobdenotter / gist:10924751
Last active August 29, 2015 13:59
Git log for changelog format
git log --abbrev-commit --reverse --date=short HEAD...23c04e0ac --pretty=format:' - %d %s - %ad, %an ([%h](http://github.com/bolt/bolt/commit/%h))' > gitlog.md
alias dir='ls -alsG'
alias gpu="git pull; php composer.phar self-update; php composer.phar update;"
alias ip="echo -n 'local: '; ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'; echo -n 'external: '; curl ifconfig.me"
alias flushdns="dscacheutil -flushcache"
alias dotclean='find . -name ".DS_Store" -print0 | xargs -0 rm -rf; find . -name "._*" -print0 | xargs -0 rm -rf'
# Minder case-sensitive, en tab-completion gelijk bij eerste tab.
shopt -s nocaseglob
bind "set completion-ignore-case on"
bind "set show-all-if-ambiguous on"
@bobdenotter
bobdenotter / Preferences.sublime-settings
Last active December 26, 2015 01:29
Sublime settings
{
"always_show_minimap_viewport": false,
"bold_folder_labels": true,
"theme": "Afterglow.sublime-theme",
"color_scheme": "Packages/Theme - Afterglow/Afterglow.tmTheme",
"font_face": "Menlo",
"font_size": 14,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
@bobdenotter
bobdenotter / extension.php
Last active April 21, 2016 15:30
extension to get JSON(p) from Bolt. use as `/json/pages?limit=1&callback=c`
<?php
// JsonInterface Extension for Bolt, by Bob den Otter
namespace JsonInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class Extension extends \Bolt\BaseExtension
{
@bobdenotter
bobdenotter / gist:6320492
Last active December 21, 2015 14:38
Waarom een Wysiwyg editor soms niet doet, wat je (als eindgebruiker zijnde) verwacht.

Plakken en knippen sucks

Stel, je hebt een mooi stukje tekst in een word-achtig programma. Als je dit wilt plakken/knippen, dan komt er ongezien een hele berg aan meta-meuk mee zoals opmaak, lettertypes, en waarvandaan het geknipt is.

Als je het als 'platte tekst' invoegt in de meeste editors, dan ofwel slopen ze niet alle opmaak er uit, ofwel te veel. Meestal ziet het er dan zo uit:

Nimium boni est, cui nihil est mali. 

Qui autem esse poteris, nisi te amor ipse autem esse poteris, nisi te amor ipse
@bobdenotter
bobdenotter / 5to9.twig
Last active December 17, 2015 08:18
How to display pages '5 through 9'..
{% setcontent records = "pages/latest/10" limit %}
{# use 'for' to iterate over the records. #}
{% for record in records %}
{# we only want '5 to 9' #}
{% if loop.index >= 5 and loop.index <= 9 %}
<article>
@bobdenotter
bobdenotter / loopfirst.twig
Created May 14, 2013 19:51
Using a loop, with loop.first to make the first one different..
{# get some records.. #}
{% setcontent records = "pages/latest/6" %}
{# use for to iterate over the records. #}
{% for record in records %}
{% if loop.first %}
{# first record is bigger.. #}
<article class="big">