This tutorial shows how to make backups to Google Cloud Storage. The backups are:
- automatic
- stored off site
- incremental
<?php | |
if ( !class_exists( 'DB' ) ) { | |
class DB { | |
public function __construct($user, $password, $database, $host = 'localhost') { | |
$this->user = $user; | |
$this->password = $password; | |
$this->database = $database; | |
$this->host = $host; | |
} | |
protected function connect() { |
#! /usr/bin/env python2 | |
# Requires: PIL, colormath | |
# | |
# Improved algorithm now automatically crops the image and uses much | |
# better color matching | |
from PIL import Image, ImageChops | |
from colormath.color_conversions import convert_color | |
from colormath.color_objects import LabColor | |
from colormath.color_objects import sRGBColor as RGBColor |
#!/usr/bin/env python | |
from suds.client import Client | |
import time | |
WSDL_URL = 'https://www.superfinanciera.gov.co/SuperfinancieraWebServiceTRM/TCRMServicesWebService/TCRMServicesWebService?WSDL' | |
date = time.strftime('%Y-%m-%d') | |
def trm(date): | |
try: | |
client = Client(WSDL_URL, location=WSDL_URL, faults=True) |
var request = require('request'); | |
// Digite el NIT sin puntos ni guiones, el dígito de Verificación no es requerido. | |
request.post( | |
'http://www.rues.org.co/RUES_Web/Consultas/ConsultaNIT_json', | |
{ form: {strNIT: '891190346' } }, | |
function (error, response, result) { | |
if (!error && response.statusCode == 200) { | |
console.log(result) |
<?php | |
$date = date("Y-m-d"); | |
try { | |
$soap = new soapclient("https://www.superfinanciera.gov.co/SuperfinancieraWebServiceTRM/TCRMServicesWebService/TCRMServicesWebService?WSDL", array( | |
'soap_version' => SOAP_1_1, | |
'trace' => 1, | |
"location" => "http://www.superfinanciera.gov.co/SuperfinancieraWebServiceTRM/TCRMServicesWebService/TCRMServicesWebService", | |
)); |
<?php | |
function contactform7_before_send_mail( $form_to_DB ) { | |
global $wpdb; | |
$form_to_DB = WPCF7_Submission::get_instance(); | |
if ( $form_to_DB ) | |
$formData = $form_to_DB->get_posted_data(); |
import { AsyncStorage } from 'react-native'; | |
const JSONAsyncStorage = Object.assign({}, AsyncStorage, { | |
getItem() { | |
return AsyncStorage.getItem.apply(null, arguments).then((res) => JSON.parse(res)); | |
}, | |
setItem(key, value) { | |
return AsyncStorage.setItem(key, JSON.stringify(value)) | |
} | |
}); |
//Send data to webView in Titanium | |
var timeGraph = Ti.UI.createWebView({ url:'graphs/timeGraph.html', touchEnabled:true }); | |
timeGraph.addEventListener('load', function(){ | |
Ti.App.fireEvent('graphCareer', series); | |
}); | |
<!-- Receive data in webView --> | |
<script type="text/javascript"> |
### Starting from a Fresh CentOS 6.2 Linode | |
### Enable the native kernel to boot from pvgrub | |
### It will autoconfigure itself with each yum update. | |
### This is adapted from a previous script for CentOS 5.5 found here: | |
### http://library.linode.com/assets/542-centos5-native-kernel-selinux-enforcing.sh | |
### Provided via the linode wiki | |
### http://library.linode.com/linode-platform/custom-instances/pv-grub-howto#sph_centos-5 | |
### Provided without warranty, although since it should only be run | |
### on first box build if your box gets broken simply rebuild it |