This file contains 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
function uniqid (prefix, more_entropy) { | |
// + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) | |
// + revised by: Kankrelune (http://www.webfaktory.info/) | |
// % note 1: Uses an internal counter (in php_js global) to avoid collision | |
// * example 1: uniqid(); | |
// * returns 1: 'a30285b160c14' | |
// * example 2: uniqid('foo'); | |
// * returns 2: 'fooa30285b1cd361' | |
// * example 3: uniqid('bar', true); | |
// * returns 3: 'bara20285b23dfd1.31879087' |
This file contains 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
table gdpr_countries { | |
"AT": "Austria", | |
"BE": "Belgium", | |
"BG": "Bulgaria", | |
"HR": "Croatia", | |
"CY": "Republic of Cyprus", | |
"CZ": "Czech Republic", | |
"DK": "Denmark", | |
"EE": "Estonia", | |
"FI": "Finland", |
This file contains 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 | |
// full path to text file | |
define("TEXT_FILE", "/home/www/default-error.log"); | |
// number of lines to read from the end of file | |
define("LINES_COUNT", 10); | |
function read_file($file, $lines) { | |
//global $fsize; |
This file contains 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 ruby | |
# encoding: utf-8 | |
# By Uğur Özyılmazel, @vigobronx | @ugurozyilmazel | |
# http://vigodome.com | http://ugur.ozyilmazel.com | http://github.com/vigo | |
def get_paged_memory_usage(match_string, paging=4096) | |
mvar = 3 | |
if match_string.split(/[^\w]/).length > 1 | |
mvar = 4 |
This file contains 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
Array.prototype.compare = function(array) { | |
if (!array) { | |
return false; | |
} | |
if (this.length !== array.length) { | |
return false; | |
} | |
for (var i = 0, l = this.length; i < l; i++) { | |
if (this[i] instanceof Array && array[i] instanceof Array) { | |
if (!this[i].compare(array[i])) { |
This file contains 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
#/bin/bash | |
if [[ `git log -1 --pretty=%B` == *"[hotfix]"* ]]; then | |
echo "HOTFIX!" | |
else | |
echo "NOT HOTFIX!" | |
fi |
This file contains 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
require "jekyll-import" | |
JekyllImport::Importers::WordpressDotCom.run({ | |
"source" => "wp-export.xml" | |
}) |
This file contains 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
#!/bin/bash | |
KEPT_RELEASES=5 | |
CWD=/Users/ain/temp | |
# Check for Bash config | |
# On FreeBSD/OS X GNU ls is required for -v option | |
if [ -f ~/.bashrc ]; then | |
shopt -s expand_aliases | |
source ~/.bashrc |
This file contains 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
var emailRegex = /^([\wäöüÜÖÄß])+(([\.]{0,1}[\wäöüÜÖÄß])?)*(([\+]{0,1}[\wäöüÜÖÄß])?)*([\wäöüÜÖÄß-])*\@([\wäöüÜÖÄß-]+\.)+([\w]{2,})+$/; |
This file contains 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
<key>Roman-Accent-Q</key> | |
<dict> | |
<key>Direction</key> | |
<string>right</string> | |
<key>Keycaps</key> | |
<string>` ^ ° • ★ “ ”</string> | |
<key>Strings</key> | |
<string>` ^ ° • ★ “ ”</string> | |
</dict> |
NewerOlder