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/php | |
<?php | |
$usage = "Automated Wordpress installer\nby Ali Gangji\nUsage: wordpress install_dir -u dbuser -p dbpass -d dbname\nOptions:\n"; | |
$usage .= " -u dbuser Database username\n"; | |
$usage .= " -p dbpass Database password\n"; | |
$usage .= " -d dbname Database name\n"; | |
$usage .= " -h dbhost Database host\n"; | |
$usage .= " --private Hide blog from search engines\n"; | |
$usage .= " --prefix prefix Database prefix\n"; | |
if ($argc < 2) { |
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 | |
declare(strict_types=1); | |
class BaseConverter | |
{ | |
/** | |
* The character set used for base conversion. | |
* Includes digits 0-9 and lowercase and uppercase letters A-Z. | |
* The minimum base is 2 and the maximum base is 62. |
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
#!/bin/bash | |
# Params | |
# Remove Files Every N Min | |
MINUTESTOKEEPFILES=2880 | |
# DO NOT EDIT BELOW THIS LINE | |
SOURCE="${BASH_SOURCE[0]}" | |
while [ -h "$SOURCE" ]; do |
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
server { | |
server_name *.EXAMPLE.COM; | |
rewrite ^(.*) http://EXAMPLE.COM$1 permanent; | |
} | |
server { | |
listen 80; | |
server_name EXAMPLE.COM; | |
root /home/webserver/EXAMPLE.COM/Public; |
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
<div class="col-sm-12"> | |
<?php | |
$this->canonical = \NG\Uri::baseUrl() . \NG\Registry::get('requestedLanguage') . "/people/" . $this->person['id'] ."/". urlencode($this->person['name']); | |
?> | |
<div class="well well-sm movieSocialButtons"> | |
<ul class="pull-left"> | |
<li><a href="#" data-url="<?php echo $this->canonical; ?>" class="gplusShare"><span class="micon-google-plus"></span> +1</a></li> | |
<li class="text-muted"> / </li> | |
<?php if (isset($this->person['profile_path']) and !empty($this->person['profile_path'])): ?> | |
<li><a href="#" data-url="<?php echo $this->canonical; ?>" data-media="<?php echo $this->profileOriginalImage . $this->person['profile_path']; ?>" data-description="<?php if(isset($this->person['name'])): echo $this->person['name']; endif;?>" class="pinitShare"> <span class="micon-pinterest"></span> Pinit</a></li> |
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
var isInIFrame = (window.location != window.parent.location) ? true : false; | |
if(isInIFrame){ | |
window.parent.location.href = window.location.href; | |
} |
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 | |
/** | |
* ngfw | |
* --- | |
* copyright (c) 2015, Nick Gejadze | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), | |
* to deal in the Software without restriction, including without limitation |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Page Title</title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
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 | |
$string = "სატესტო string"; | |
//echo preg_replace('/[^\p{Georgian}]\d/u', '', $string); // Leaves the Numbers | |
echo preg_replace('/[^\p{Georgian}]/u', '', $string); | |
// output: | |
// სატესტო |
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
#!/bin/bash | |
# | |
# Server Status Script | |
# Version 1 | |
CPUTIME=$(ps -eo pcpu | awk 'NR>1' | awk '{tot=tot+$1} END {print tot}') | |
CPUCORES=$(cat /proc/cpuinfo | grep -c processor) | |
UP=$(echo `uptime` | awk '{ print $3 " " $4 }') | |
echo " | |
System Status |
OlderNewer