Skip to content

Instantly share code, notes, and snippets.

Avatar

Mr.Mark mistermark

View GitHub Profile
@mistermark
mistermark / clock.html
Created Oct 6, 2020 — forked from sam0737/clock.html
OBS Studio: A HTML page for showing current date and time in the video
View clock.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>A simple clock</title>
</head>
<body translate="no" >
View obs-time-date-browser-source.html
<!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 Nov 21, 2015
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.
View download-all-mp3.js
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 Aug 10, 2015 — forked from anonymous/wp-flipswitch.php
Showing a grid of 2 items per row. Each row the image should flip sides, left to right.
View wp-flipswitch.php
//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;
View .htaccess
# 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 Mar 21, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
@function strip-unit($value) {
@return $value / ($value * 0 + 1);
}
@function em($px, $base: $font-size) {
View Obfuscate credit card number in AngularJS
/**
* 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, "*");
View xbmc_cmdline.txt
boot=/dev/mmcblk0p1 disk=/dev/sda1 ssh quiet
View .editorconfig
# 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 Nov 29, 2013
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.
View fb_list_friends_names.js
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;
You can’t perform that action at this time.