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 | |
site=$1 | |
absdir=`pwd` | |
fulldir="$absdir/$site/public_html/wp-content/backupwordpress*backups" | |
pubdir="$absdir/$site/public_html" | |
echo "Running backup" | |
echo $fulldir |
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 | |
set_time_limit(0); | |
function unzipFile( $file, $dir = null ) { | |
if ( is_null( $dir ) ) { | |
$dir = dirname( __FILE__ ); | |
} | |
$dir = $dir . DIRECTORY_SEPARATOR . 'unzipped'; |
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
ol.comment-list { | |
list-style: none; | |
background: #f7f7f7; | |
padding: 10px; | |
float: left; | |
width: 100%; | |
} | |
.comment-metadata { | |
text-align: right; |
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 | |
/** | |
* This class can be used to register a template outside WordPress theme. | |
* | |
* NOTE: This class is fork of the original class which was hardcoded to look for | |
* the template in the plugin directory. After the modifications i added | |
* the possiblity new templates to be registered using hook. | |
* | |
* @author gdarko | |
* |
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 -e | |
fatal() { echo "FATAL: $@" 1>&2; exit 1; } | |
warn() { echo "WARN: $@"; } | |
info() { echo "INFO: $@"; } | |
usage() { | |
cat <<EOF | |
Usage: sudo $0 client_or_profile_name | |
This will create two ovpn files in this directory (proxy and noproxy). |
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 | |
function dg_get_data() { | |
return array( | |
'name' => 'Darko Gjorgjijoski', | |
'age' => 23 | |
); | |
} |
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 | |
# CHANGE THESE | |
auth_email="user@example.com" | |
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings | |
zone_name="$1" | |
record_name="$2" | |
# MAYBE CHANGE THESE | |
ip=$(curl -s http://ipv4.icanhazip.com) |
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 | |
// This file contains general useful PHP functions that can be included everywhere. | |
/** | |
* Wrapper for writing the interactions to /wp-content/uploads/ file | |
* | |
* @param $message | |
* @param string $filename | |
*/ | |
function dg_log_write( $message, $filename = "log.txt" ) { |
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 | |
sudo apt-get install libc6:i386 libstdc++6:i386 | |
wget http://cdn.primatelabs.com/Geekbench-3.4.2-Linux.tar.gz | |
tar -zxvf Geekbench-3.4.2-Linux.tar.gz | |
cd dist/Geekbench-3.4.2-Linux/ | |
./geekbench |
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
<form method="POST"> | |
<div class="form-row"> | |
<label>Name</label> | |
<input type="text" placeholder="Enter name"> | |
<div> | |
<div class="form-row"> | |
<?php | |
$key = 'profile_picture'; | |
$placeholder = 'https://placehold.it/150x150?text=IMG'; | |
$current_value = get_user_meta(get_current_user_id(), $key, true); |