Skip to content

Instantly share code, notes, and snippets.

View mistermark's full-sized avatar

Mark de Jong mistermark

View GitHub Profile
@mistermark
mistermark / clock.html
Created October 6, 2020 14:23 — forked from sam0737/clock.html
OBS Studio: A HTML page for showing current date and time in the video
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>A simple clock</title>
</head>
<body translate="no" >
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>A simple clock</title>
</head>
<body translate="no" >
@mistermark
mistermark / download-all-mp3.js
Last active November 21, 2015 13:01
Download all MP3 files from a page, without having to click all the links. Works only in Firefox and Chrome. Safari doesn't work, IE is untested.
var config = {
timeout: 0,
batch: 5,
count: 0
};
var init = function(cb) {
if(!config.mp3List) {
config.mp3List = $("a[href*='.mp3']");
@mistermark
mistermark / wp-flipswitch.php
Created August 10, 2015 18:41 — forked from anonymous/wp-flipswitch.php
Showing a grid of 2 items per row. Each row the image should flip sides, left to right.
//list terms in a given taxonomy (useful as a widget for twentyten)
$args = array(
'post_type' => 'staff',
'include' => $item_arr
);
$staff_query = get_posts($args);
$output .= '<div class="staff-grid">';
$i = 0;
$wrap_count = 2;
# Attempt to load files from production if they're not in our local version
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
# Replace http://stevegrunwell.com with your production site's domain name
RewriteRule (.*) http://stevegrunwell.com/wp-content/uploads/$1
</IfModule>
# source: https://stevegrunwell.com/blog/keeping-wordpress-under-version-control-with-git/
@mistermark
mistermark / SassMeister-input.scss
Created March 21, 2015 08:16
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
@function strip-unit($value) {
@return $value / ($value * 0 + 1);
}
@function em($px, $base: $font-size) {
/**
* Format for a Credit Card
* @return {string} Formatted number
*/
module.filter("creditcard", function() {
return function(str) {
if(typeof str !== "undefined"){
var nums = str.substr(0,19).replace(/[^\d]/gi,"");
var r = nums.match(/(\d){4}/g);
r[1] = r[1].replace(/[0-9]/g, "*");
boot=/dev/mmcblk0p1 disk=/dev/sda1 ssh quiet
# http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@mistermark
mistermark / fb_list_friends_names.js
Created November 29, 2013 12:28
Grab all names of your friends in a list and create an array out of them to use for further functions. Open up the list and click "Manage List" > "Edit List". Then run this script in the browser console.
var items = [],
textItems = [];
items.push(document.querySelectorAll(".friendListItem"));
for (var i = 0; i < items[0].length; i++) {
textItems.push(items[0][i].childNodes[2].textContent);
};
textItems;