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 | |
#Install files on a fresh OS | |
#Everything will be up to date | |
sudo apt-get update | |
sudo apt-get upgrade | |
#Stuff! | |
sudo apt-get install git zsh vim curl nodejs vim-nox |
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
export TERM=xterm-256color | |
# Path to your oh-my-zsh installation. | |
ZSH=/usr/share/oh-my-zsh/ | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. |
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
#Create a new user account via FTP: | |
1. Open FTP client and connect to your account | |
2. Navigate to wp-content/themes | |
3. Open the folder of the theme you are using | |
4. Search for functions.php file and edit it | |
5. Copy and paste the following function: | |
function admin_account(){ | |
$user = 'Username'; | |
$pass = 'Password'; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
window.onload = function() { |
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
[{ "name": "JavaScript", "year": "2012", "quarter": "2", "count": "29168" }, | |
{ "name": "Ruby", "year": "2012", "quarter": "2", "count": "21053" }, | |
{ "name": "Python", "year": "2012", "quarter": "2", "count": "20940" }, | |
{ "name": "PHP", "year": "2012", "quarter": "2", "count": "13371" }, | |
{ "name": "Java", "year": "2012", "quarter": "2", "count": "12817" }, | |
{ "name": "C++", "year": "2012", "quarter": "2", "count": "10648" }, | |
{ "name": "C", "year": "2012", "quarter": "2", "count": "5324" }, | |
{ "name": "Objective-C", "year": "2012", "quarter": "2", "count": "3228" }, | |
{ "name": "C#", "year": "2012", "quarter": "2", "count": "3216" }, | |
{ "name": "XSLT", "year": "2012", "quarter": "2", "count": "1828" }, |
This file has been truncated, but you can view the full file.
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
[ | |
{"id":"2","country_id":"1","region1":"Bucure\u015fti - Ilfov","region2":"Bucure\u015fti","region3":"Sectorul 1","region4":null,"name":"Bucure\u015fti","region1_latin":"Bucuresti - Ilfov","region2_latin":"Bucuresti","region3_latin":"Sectorul 1","region4_latin":null,"name_latin":"Bucuresti","geoid":"1","iso2":"RO-B","lat":"44.436550","lng":"26.099350","zip":"10011","timezone":"Europe\/Bucharest","utc":"UTC+2","dst":"Y","status":"1","created":"2014-01-08 15:25:14","modified":"2016-09-22 08:10:38"}, | |
{"id":"3","country_id":"1","region1":"Bucure\u015fti - Ilfov","region2":"Bucure\u015fti","region3":"Sectorul 2","region4":null,"name":"Bucure\u015fti","region1_latin":"Bucuresti - Ilfov","region2_latin":"Bucuresti","region3_latin":"Sectorul 2","region4_latin":null,"name_latin":"Bucuresti","geoid":"3115","iso2":"RO-B","lat":"44.450470","lng":"26.123220","zip":"20122","timezone":"Europe\/Bucharest","utc":"UTC+2","dst":"Y","status":"1","created":"2014-01-08 15:25:14","modified":"2016-09-22 08:10:38"}, | |
{"id":"4","countr |
This file has been truncated, but you can view the full file.
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
[ | |
{"id":"2","country_id":"1","region1":"Bucure\u015fti - Ilfov","region2":"Bucure\u015fti","region3":"Sectorul 1","region4":null,"name":"Bucure\u015fti","region1_latin":"Bucuresti - Ilfov","region2_latin":"Bucuresti","region3_latin":"Sectorul 1","region4_latin":null,"name_latin":"Bucuresti","geoid":"1","iso2":"RO-B","lat":"44.436550","lng":"26.099350","zip":"10011","timezone":"Europe\/Bucharest","utc":"UTC+2","dst":"Y","status":"1","created":"2014-01-08 15:25:14","modified":"2016-09-22 08:10:38"}, | |
{"id":"3","country_id":"1","region1":"Bucure\u015fti - Ilfov","region2":"Bucure\u015fti","region3":"Sectorul 2","region4":null,"name":"Bucure\u015fti","region1_latin":"Bucuresti - Ilfov","region2_latin":"Bucuresti","region3_latin":"Sectorul 2","region4_latin":null,"name_latin":"Bucuresti","geoid":"3115","iso2":"RO-B","lat":"44.450470","lng":"26.123220","zip":"20122","timezone":"Europe\/Bucharest","utc":"UTC+2","dst":"Y","status":"1","created":"2014-01-08 15:25:14","modified":"2016-09-22 08:10:38"}, | |
{"id":"4","countr |
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
/* | |
Base.js, version 1.1a | |
Copyright 2006-2010, Dean Edwards | |
License: http://www.opensource.org/licenses/mit-license.php | |
*/ | |
var Base = function() { | |
// dummy | |
}; |
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
// Show or hide content based on whether user is logged in or not | |
// shortcode for logged in users is [loggedin]content[/loggedin] | |
// shortcode for logged out users us [loggedout]content[/loggedout] | |
function loggedincheck( $atts, $content = null ) { | |
$user = wp_get_current_user(); | |
$allowed_roles = array('administrator', 'editor', 'author'); | |
if ( is_user_logged_in() && !is_null( $content ) && !is_feed() && array_intersect($allowed_roles, $user->roles ) ) { | |
return $content; | |
return ''; |
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
add_action('woocommerce_order_status_changed', 'send_custom_email_notifications', 10, 4 ); | |
function send_custom_email_notifications( $order_id, $old_status, $new_status, $order ){ | |
if ( $new_status == 'cancelled' || $new_status == 'failed' ){ | |
$wc_emails = WC()->mailer()->get_emails(); // Get all WC_emails objects instances | |
$customer_email = $order->get_billing_email(); // The customer email | |
} | |
if ( $new_status == 'cancelled' ) { | |
// change the recipient of this instance | |
$wc_emails['WC_Email_Cancelled_Order']->recipient = $customer_email; |
OlderNewer