View plantuml-build.sh
#!/usr/bin/env bash | |
cd $(dirname $0) | |
files="$@" | |
if [[ -z "$files" ]]; then | |
files="$(ls *.puml)" | |
fi | |
java -jar plantuml.jar -v -tpng $files | |
exit |
View rebuild-prestashop-child-theme-translations.sh
PHP_PATh="/opt/php-7.1/bin/php" | |
APP_ROOT_DIR="/web/" | |
MAIN_LANG="pl-PL" | |
with_dry_run="y" | |
themes_dir_name="themes/" | |
translations_dir_name='translations/' | |
template_file_name='templates/example.tpl' |
View hexadecimal.php
<?php | |
class HexTools | |
{ | |
private static $verbalMap = [ | |
'00' => 'zero', | |
'-0' => '', | |
'0-' => '', | |
'-1' => 'one', | |
'1-' => 'teen', |
View script-bookmark.js
javascript:{var%20whitespace%20=%20"-\/|.,!:;'\"%20\t\n\r{}[]()";var%20stack%20=%20[];var%20curNIndex%20=%200;var%20curNode%20=%20null;var%20curIndex%20=%20-1;var%20state%20=%201;var%20lastword%20=%20'';String.prototype.startsWith%20=%20function(prefix)%20{return%20this.indexOf(prefix)%20===%200;};String.prototype.endsWith%20=%20function(suffix)%20{return%20this.match(suffix+"$")%20==%20suffix;};/*%20Nie%20moge%20tak%20robi%C4%87%20niestety%20*/function%20kurwizeLink(url){if(url.startsWith('javascript:'))return%20url;%20/*%20chyba%20niewiele%20moge%20zrobic%20kurwa%20*/if(url.startsWith('#'))return%20url;if(url.startsWith('https://www.google.pl'))return%20url;%20/*%20no,%20bo%20kurwa,%20bez%20jaj%20;p%20*/var%20base%20=%20'';if(!url.startsWith('http')){base%20=%20location.protocol%20+%20"://"%20+%20location.host;if(!url.startsWith('/')){var%20pathname%20=%20location.pathname;base%20+=%20pathname.substring(0,%20pathname.lastIndexOf('/'));}}return%20'http://kurwa.keraj.net/?url='+base+url;};function%20nextLette |
View facebook-calendar.php
<?php | |
error_reporting(0); | |
ini_set('display_errors', false); | |
# VALIDATION | |
if (!isset($_GET['uid'], $_GET['key'], $_GET['type'])) { | |
http_response_code(400); | |
die('No request params!'); | |
} |
View symfony-annotations-validate.php
<?php | |
use Symfony\Component\ClassLoader\ClassMapGenerator; | |
$loader = require_once __DIR__ . '/../app/bootstrap.php.cache'; | |
require_once __DIR__ . '/../app/AppKernel.php'; | |
$kernel = new AppKernel('dev', true); | |
$kernel->loadClassCache(); | |
$kernel->boot(); |
View time_hasher.php
<?php | |
function generate_time($timeString='now'){ | |
$datetime = new \DateTime($timeString); | |
$string = sprintf("%02d-%06d-%08d-%02d", | |
mt_rand(0,99), | |
$datetime->format('u'), | |
( | |
$datetime->format('z')*24*60*60 | |
+ $datetime->format('H')*60*60 |
View paktpub-claim.js
var PaktPub = (function () { | |
"use strict"; | |
var freeLearningURL = 'https://www.packtpub.com/packt/offers/free-learning', | |
logoutURL = 'https://www.packtpub.com/logout'; | |
var notify = function (message, timeout) { | |
var useNotificationAPI = false; | |
if ("Notification" in window) { | |
if (Notification.permission === "granted") { | |
useNotificationAPI = true; | |
} else if (Notification.permission !== 'denied') { |