Skip to content

Instantly share code, notes, and snippets.

View schalkburger's full-sized avatar
💪
eat sleep code repeat

Schalk Burger schalkburger

💪
eat sleep code repeat
View GitHub Profile
@schalkburger
schalkburger / bookmarklet-svg-crowbar.js
Last active December 19, 2021 19:24
Bookmarklet - SVG Crowbar
javascript:(function () { var e = document.createElement('script'); e.setAttribute('src', 'https://nytimes.github.io/svg-crowbar/svg-crowbar-2.js'); e.setAttribute('class', 'svg-crowbar'); document.body.appendChild(e); })();
@schalkburger
schalkburger / findingfixing-unintended-body-overflow.js
Created December 19, 2021 19:21
Finding/Fixing Unintended Body Overflow
javascript:var docWidth = document.documentElement.offsetWidth; [].forEach.call( document.querySelectorAll('*'), function(el) { if (el.offsetWidth > docWidth) { console.log(el); } } );
@schalkburger
schalkburger / debugTimeout.js
Created August 22, 2021 14:22
Debugger Timeout Bookmarklet
javascript:var duration = prompt('Duration?');setTimeout(function() { debugger; }, duration);
@schalkburger
schalkburger / contact-form-7-better.css
Created February 17, 2015 08:32
Contact Form 7 better CSS
div.wpcf7 {
margin: 0;
padding: 0;
}
div.wpcf7 input.wpcf7-text, div.wpcf7 textarea {
border: 1px solid #CCCCCC;
border-radius: 3px;
color: #555555;
display: inline-block;
font-size: 1em;
@schalkburger
schalkburger / csgo-alt-tab-fps-fix.cfg
Last active February 28, 2021 14:21
CS:GO Alt + Tab FPS Fix
// This command can be used to disable, lengthen or shorten, the "sleeping" of the game engine when you are tabbed out, or CS:GO is not your current active window. Usually, when you tab out of CS:GO, the engine will "sleep" for a set amount of milliseconds (repeatedly) to reduce power and resource usage - this will lower your FPS and lag any locally hosted servers when tabbing out. Set this to 0 to completely disable the sleeping of the engine when tabbed out.
engine_no_focus_sleep 0
@schalkburger
schalkburger / demo.cfg
Created February 26, 2021 02:04
Schalk's demo.cfg
// Schalk's demo.cfg
// https://gist.github.com/schalkburger/3553517e2db3cf094a3672d235cc50e1
// Updated: 2021-02-26 04:00:26
// --- 1. Aliases --- //
net_graph 0
alias c "clear" //Fast clear console alias
alias mm "bind kp_enter kp_enter_switch;bind kp_ins demo_goto_1x_back;bind kp_del demo_goto_1x_forward"
alias faceit "bind kp_enter kp_enter_switch_faceit;bind kp_ins demo_goto_1x_back_faceit;bind kp_del demo_goto_1x_forward_faceit"
@schalkburger
schalkburger / warmup.cfg
Created February 26, 2021 02:02
Schalk's warmup.cfg
// Schalk's warmup.cfg
// https://github.com/schalkburger/csgo-autoexec
// Updated: 2021-02-26 04:01:24
// --- 1. TRAINING SETTINGS --- //
sv_cheats 1 // allows for god mode and no clip
developer "1"
con_enable "1"
con_filter_enable "2"
@schalkburger
schalkburger / clubhouse-stylus-styles.css
Created February 26, 2020 21:19
My Clubhouse Stylus Styles
body,
html {
background: #F9F9F9;
}
a {
color: #007CC2;
}
.markdown-formatted p {
@schalkburger
schalkburger / sage_favicons.php
Last active January 16, 2020 01:33
Roots Sage Favicons
/**
* Load favicons
* Place icons in the theme images directory. Want more? http://realfavicongenerator.net/
*/
function sage_favicons() {
echo '<link rel="apple-touch-icon" sizes="57x57" href="'. get_template_directory_uri() .'/dist/images/apple-touch-icon-57x57.png">';echo "\n";
echo '<link rel="apple-touch-icon" sizes="60x60" href="'. get_template_directory_uri() .'/dist/images/apple-touch-icon-60x60.png">';echo "\n";
echo '<link rel="apple-touch-icon" sizes="72x72" href="'. get_template_directory_uri() .'/dist/images/apple-touch-icon-72x72.png">';echo "\n";
echo '<link rel="apple-touch-icon" sizes="76x76" href="'. get_template_directory_uri() .'/dist/images/apple-touch-icon-76x76.png">';echo "\n";
echo '<link rel="apple-touch-icon" sizes="114x114" href="'. get_template_directory_uri() .'/dist/images/apple-touch-icon-114x114.png">';echo "\n";
function custom_body_classes($classes)
{
// the list of WordPress global browser checks
// https://codex.wordpress.org/Global_Variables#Browser_Detection_Booleans
$browsers = ['is_iphone', 'is_chrome', 'is_safari', 'is_NS4', 'is_opera', 'is_macIE', 'is_winIE', 'is_gecko', 'is_lynx', 'is_IE', 'is_edge'];
// check the globals to see if the browser is in there and return a string with the match
$classes[] = join(' ', array_filter($browsers, function ($browser) {
return $GLOBALS[$browser] ;
}));
return $classes;