Skip to content

Instantly share code, notes, and snippets.


Bram Perry bramchi

View GitHub Profile
bramchi / get_orders_with_appointment.php
Last active Oct 30, 2020
Get all WooCommerce orders from Wordpress that have a Local Pickup Plus appointment
View get_orders_with_appointment.php
function get_orders_with_pickup_appointment() {
global $wpdb;
$sql = "
`{$wpdb->prefix}woocommerce_order_items` AS `items`
bramchi / export-microsoft-to-do-list.js
Last active May 15, 2018
Copy a Microsoft To-Do list from the webapp to your clipboard in plaintext
View export-microsoft-to-do-list.js
Paste this in your javascript console at
The texts will then land on your clipboard, so you can paste them into
another todo app like todoist, that will pickup multiple tasks based on the new lines
var nodes = document.querySelectorAll('.taskItem-title');
var list = [];
View gist:eb53261e1c5dc1ac8fbcbf8e536daf8e
"editor.fontSize": 15,
"workbench.sideBar.location": "left",
"workbench.activityBar.visible": true,
"workbench.colorTheme": "One Monokai",
// "editor.fontFamily": "Source Code Pro, Menlo, Monaco, 'Courier New', monospace",
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"editor.minimap.enabled": false,
"editor.scrollbar.horizontal": "hidden",
bramchi / css-svg-data-bg.css
Last active Apr 6, 2016
Use a compressed SVG image directly as CSS background image. SVGOMG / is awesome for SVG compression by the way.
View css-svg-data-bg.css
a.nav-social-link.-facebook {
background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 16 16" xmlns=""><path d="M11.133 6h-2.09V4.718c0-.482.342-.593.582-.593H11.1V2.008L9.07 2C6.816 2 6.303 3.58 6.303 4.59V6H5v2.18h1.303v6.172h2.74v-6.17h1.85L11.134 6z" fill="%231D1C1B" fill-rule="evenodd"/></svg>');
bramchi / active-media-query-helper.scss
Created Mar 20, 2016
A little helper snippet to complement the visual-grid in Bourbon Neat. It shows what media query is currently active, using a little label in the bottom right corner.
View active-media-query-helper.scss
// Set visual-grid in _grid-settings.scss for a nice grid overlay
@if ($visual-grid) {
body:after {
display: block;
position: fixed;
bottom: 0;
right: 0;
font-size: 12px;
background-color: darkred;
color: white;
bramchi /
Last active Feb 6, 2018 — forked from danawoodman/
React Hello World Examples
bramchi / searchform.php
Last active Sep 23, 2021 searchform.php template hack to get search widget working in Polylang, only searching within the active language. 'soil-nice-search' disabled btw.
View searchform.php
* searchform.php template hack to fix Polylang search
* Note: Polylang setting 'Hide URL language info for default language' should be enabled for this to work.
* Soil-nice-search disabled in Roots.
bramchi / Run project script
Created Jul 9, 2014
This applescript is a nice way to start up a local development project. It opens two finder tabs, runs the local webserver, opens the corresponding sublime text project, runs grunt and opens the local url in Google Chrome.
View Run project script
tell application "Terminal"
do script "open /Users/bram/Dropbox/Projecten/ && open /Users/bram/Sites/ && http start && cd /Users/bram/Sites/ && subl --project stagewerkt && grunt watch"
end tell
tell application "Google Chrome"
open location ""
end tell