I hereby claim:
- I am blizzrdof77 on github.
- I am blizzrdof77 (https://keybase.io/blizzrdof77) on keybase.
- I have a public key ASDvmPKv9H4qgAUEEFgHXoMfeJsXDgSaxfRp31cYzkc_0go
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
SDG = SDG || {}; | |
SDG.loadStyle = function(cssSource, append) { | |
var append = typeof append === 'undefined' ? true : append, | |
external = !(cssSource.indexOf('{') > 0 && cssSource.indexOf('}') > 1), | |
newElem = external ? ((function() { | |
i = document.createElement('link'); | |
i.rel = 'stylesheet'; | |
i.href = cssSource; | |
i.type = 'text/css'; |
#!/usr/bin/env bash | |
# Path to your hosts file | |
hostsFile="/etc/hosts" | |
# Default IP address for host | |
ip="127.0.0.1" | |
# Hostname to add/remove. | |
hostname="$2" |
<?php | |
/** | |
* Legacy PHP & MySQL Compatibility Functions | |
*/ | |
/** | |
* replacement for all mysql functions | |
* | |
* Be aware, that this is just a workaround to fix-up some old code and the resulting project | |
* will be more vulnerable than if you use the recommended newer mysqli-functions instead. |
/** | |
* Slugify | |
* | |
* @param string text | |
* @return string | |
*/ | |
function cleanSlug(text) { | |
return ( | |
text.toString().toLowerCase() | |
.replace(/\s+/g, '-') /* Replace spaces with - */ |
<?php | |
// FOLLOW A SINGLE REDIRECT: | |
// This makes a single request and reads the "Location" header to determine the | |
// destination. It doesn't check if that location is valid or not. | |
function get_redirect_target($url) | |
{ | |
$ch = curl_init($url); | |
curl_setopt($ch, CURLOPT_HEADER, 1); | |
curl_setopt($ch, CURLOPT_NOBODY, 1); |
/* json_storage.js | |
* @danott | |
* 26 APR 2011 | |
* | |
* Building on a thread from Stack Overflow, override localStorage and sessionStorage's | |
* getter and setter functions to allow for storing objects and arrays. | |
* | |
* Original thread: | |
* http://stackoverflow.com/questions/2010892/storing-objects-in-html5-localstorage | |
*/ |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular-animate.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular-cookies.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular-aria.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular-messages.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.4/angular-material.min.js"></script> |
# ------------------------------------------ | |
# Better `ping` support to allow for mixed | |
# domains/hostnames with protocols (e.g. 'http://..') | |
# | |
# @1 = host | |
# -> Example usage: | |
# ping http://google.com/ | |
# ------------------------------------------ | |
function ping { | |
local pingdomain="$1" |
#!/bin/bash | |
# Split a string returning the specified index (or 2nd instance by default) | |
if [ -z "$1" ] || [ -z "$2" ]; then | |
echo "Provide split delimiter and string" | |
else | |
delim="$1" | |
string="$2" | |
if [ -z "$3" ]; then |