This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { background: #404040; color: #e6e6e6; } | |
a { color: #949494; } | |
a:link, a:visited { color: #949494; } | |
a:hover, a:active, a:focus { color: #c7c7c7; } | |
hr { border-bottom: 1px solid #424242; border-top: 1px solid #404040; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function stopwatch($key){ | |
static $log; | |
static $tstart; | |
$returnVal = 0.0; | |
if(empty($log)){ | |
$log = array(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Plugin Name: Skip SSL Verify | |
Plugin URI: http://www.damiencarbery.com | |
Description: Skip SSL verify in curl downloads - fixes: Download failed. error:0D0890A1:asn1 encoding routines:func(137):reason(161). | |
Author: Damien Carbery | |
Version: 0.1 | |
*/ | |
function ssv_skip_ssl_verify($ssl_verify) { | |
return false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package Divi_Disable_Maps | |
* @version 1.0 | |
*/ | |
/* | |
Plugin Name: Divi Disable Maps | |
Description: Enable only if you are not using the map module. Fixes "Google Maps JavaScript API warning: NoApiKeys" wanring in the console. | |
Author: lots0logs | |
Author URI: https://gist.github.com/lots0logs/67d639070dc54505eef1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Extract key and value from all "define" constants in a wp-config.php file using built-in php tokenizer functions. | |
* Does not "include" the file so it won't pollute the current scope or cause side effects. | |
* | |
* NOTE: Works with constants defined as string, bool or number | |
* Method can extract values from statements like: | |
* define( 'DB_NAME', 'wordpress' ); | |
* define('WP_DEBUG', true); | |
* define('SOMEINT', 1234567); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author https://stackoverflow.com/users/308825/maerlyn | |
* Based off the one in Symfony's Jobeet tutorial. | |
*/ | |
function slugify($text) | |
{ | |
// replace non letter or digits by - | |
$text = preg_replace('~[^\pL\d]+~u', '-', $text); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//@see http://www.woodlandmanufacturing.com/articles/news/how-to-make-a-stranger-things-alphabet-sign-with-lights-code | |
#include "FastLED.h" | |
// How many leds in your strip? | |
#define NUM_LEDS 50 | |
#define DATA_PIN 5 | |
#define BRIGHTNESS 255 | |
// Define the array of leds |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
/* A tool to import repos from gitolite to gogs (db version 17) | |
* | |
* Gogs and gitolite use bare repos when hosting your repositories. | |
* You can add repositories directly into the gogs-repo directory but gogs won't see | |
* them until they are also added to the database. | |
* | |
* This script adds entries into the repository, access, watch and team_repo tables. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Generate a universal "Student View" button. | |
* Modified to hide button on course edit screens to avoid conflicts with kennithware | |
* @see https://community.canvaslms.com/groups/canvas-developers/blog/2017/04/20/universal-student-view-button-for-teachers | |
*/ | |
var universalStudentView = function() { | |
var isTeacher, isEdit, isCourse, courseId, templateButton, sutdentViewVisible, studentViewURL, getPath; | |
// Determine if the user is actually a teacher |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP FUNCTION IF EXISTS random_word; | |
CREATE FUNCTION random_word () | |
RETURNS TEXT | |
RETURN (ELT( FLOOR(1 + (RAND() * (100-1))), | |
'Lorem', 'ipsum', 'dolor', 'sit', 'amet', 'consectetur', 'adipiscing', 'elit', 'Integer', 'nec', | |
'odio', 'Praesent', 'libero', 'Sed', 'cursus', 'ante', 'dapibus', 'diam', 'Sed', 'nisi', | |
'Nulla', 'quis', 'sem', 'at', 'nibh', 'elementum', 'imperdiet', 'Duis', 'sagittis', 'ipsum', | |
'Praesent', 'mauris', 'Fusce', 'nec', 'tellus', 'sed', 'augue', 'semper', 'porta', 'Mauris', | |
'massa', 'Vestibulum', 'lacinia', 'arcu', 'eget', 'nulla', 'Class', 'aptent', 'taciti', 'sociosqu', |