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
for i in `mysql -u root -p123456 activation -B -e "show tables" | grep core `; do mysql -u root -p123456 activation -e "drop table $i"; done |
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
sudo trac-admin /var/lib/trac2/activation initenv | |
Path to repository [/path/to/repos]> /var/lib/subversion/repositorios/activation | |
sudo chmod a+rwx -R /var/lib/trac2/activation/ | |
sudo nano -w /etc/apache2/sites-available/trac_sidi | |
sudo /etc/init.d/apache2 reload | |
sudo trac-admin /var/lib/trac2/activation permission add pablo WIKI_ADMIN | |
sudo trac-admin /var/lib/trac2/activation permission add pablo MILESTONE_ADMIN | |
sudo trac-admin /var/lib/trac2/activation permission add pablo PERMISSION_ADMIN |
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 | |
require_once 'PAMI/Autoloader/Autoloader.php'; | |
PAMI\Autoloader\Autoloader::register(); | |
ini_set('include_path', implode(PATH_SEPARATOR, array( | |
'phar://pami.phar', '/usr/share/php/log4php', ini_get('include_path') | |
))); | |
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
#include <iostream> // para usar cout | |
#include <cstdlib> // para usar EXIT_SUCCESS | |
#include <vector> // para usar vectores (son como arrays) | |
// Para no tener que escribir std::cout, vector cada vez que se usen | |
using namespace std; | |
// Definición de funciones útiles | |
void printData(const vector<int> &data); | |
void swap(int *a, int *b); |
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
for i in *.m4a; do mplayer -quiet -ao pcm:fast:waveheader:file=output.wav "$i" && lame --quiet -h -b 320 output.wav "$i.mp3" && mv "$i.mp3" "`echo "$i.mp3" | sed -e 's/m4a.mp3/mp3/'`" && rm output.wav && rm "$i"; done |
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 | |
if(!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == ""){ | |
$redirect = "https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; | |
header("Location: $redirect"); | |
} | |
class Host { | |
private $ip; | |
private $hosts; |
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 | |
$json = file_get_contents("php://stdin"); | |
$playlist = json_decode($json); | |
foreach($playlist->items as $index => $item) { | |
$artist = $item->artistName; | |
$album = $item->albumTitle; | |
$title = $item->name; |
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
#include <iostream> | |
#include <string> | |
using namespace std; | |
class A { | |
public: | |
void f(const string &arg1, const string &arg2) { | |
cout << arg1 << ", " << arg2 << endl; | |
} |
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
#!/usr/bin/php | |
<?php | |
class Contact { | |
public $name; | |
public $email; | |
public function __construct($name = "", $email = "") { | |
$this->name = $name; | |
$this->email = $email; |
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 | |
dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | xargs sudo apt-get -y purge |
OlderNewer