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
mysqldump -u {USERNAME} -p {DBCLON} > dump.sql | |
mysqladmin -u {USERNAME} -p create {NEWDB} | |
mysql -u {USERNAME} -p {NEWDB} < dump.sql |
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/sh | |
sudo service mysql start | |
sudo service apache2 start |
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
<snippet> | |
<content><![CDATA[ | |
<div class="form-group"> | |
<label for="$1">$1</label> | |
<input type="text" class="form-control" id="$1" placeholder=""> | |
</div> | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>sinput</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> |
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
@echo off | |
start python C:\test\test.py | |
exit |
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
Sub Macro2() | |
Dim x As Integer | |
x = InputBox("Enter number of times to copy Sheet1") | |
For numtimes = 1 To x | |
'Loop by using x as the index number to make x number copies. | |
'Replace "Sheet1" with the name of the sheet to be copied. | |
ActiveWorkbook.Sheets("1").Copy _ | |
After:=ActiveWorkbook.Sheets("1") |
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 | |
$directorios = array( '****', '***' ); | |
$dir = $_SERVER['DOCUMENT_ROOT']; | |
$direccion = $dir . rtrim(dirname($_SERVER['PHP_SELF'] ) ); | |
$direccion = preg_replace('/\/\//', '/', $direccion) . "/"; | |
function full_copy( $source, $target ) { | |
if ( is_dir( $source ) ) { | |
@mkdir( $target ); |
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 | |
$dir = $_SERVER['DOCUMENT_ROOT']; | |
?> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> |
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
import httplib, urllib | |
parametros = urllib.urlencode({'campo1': 'valor uno', 'campo2' : 'valor dos'}) | |
cabeceras = {"Content-type": "application/x-www-form-urlencoded", "Accept": "text/plain"} | |
abrir_conexion = httplib.HTTPConnection("localhost:80") | |
abrir_conexion.request("POST", "/python/testConsulta.php", parametros, cabeceras) | |
respuesta = abrir_conexion.getresponse() |
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 | |
$destino = "/var/www/Guardar/"; | |
$destino2 = "/Guardar/"; | |
$filetype = $_FILES['file']['type']; | |
$type = substr($filetype, (strpos($filetype,"/"))+1); | |
$types=array("jpeg","gif","png", "jpg"); | |
if(in_array($type, $types)){ | |
if(isset($_FILES['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
<?php | |
/** | |
* clase de FTP | |
*/ | |
class Ftp | |
{ | |
private $server; |
NewerOlder