This file contains hidden or 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
############################################# | |
# Push de la rama actual | |
git push origin $rama_actual | |
############################################# | |
# Volver a un commit anterior, descartando los cambios | |
git reset --HARD $SHA1 | |
############################################# | |
# Ver y descargar Ramas remotas |
This file contains hidden or 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
############################################# | |
# Push de la rama actual | |
git push origin $rama_actual | |
############################################# | |
# Volver a un commit anterior, descartando los cambios | |
git reset --HARD $SHA1 | |
############################################# | |
# Ver y descargar Ramas remotas |
This file contains hidden or 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/env xdg-open | |
[Desktop Entry] | |
Version=1.0 | |
Type=Application | |
Terminal=false | |
StartupNotify=true | |
Name=Smartgit | |
Exec=env SMARTGIT_JAVA_HOME=/opt/apps/jre7/ /opt/apps/smartgit/bin/smartgit.sh | |
Icon=/opt/apps/smartgit/bin/smartgit-64.png |
This file contains hidden or 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
<html> | |
<h3>Form</h3> | |
<form method="post" enctype="multipart/form-data"> | |
<input type="hidden" name="MAX_FILE_SIZE" value="50000" /> | |
Image (< 50kb): <input type="file" name="upload" /><br/> | |
ClientID: <input type="text" name="clientid" /><br/> | |
<input type="submit" value="Upload to Imgur" /> | |
</form> | |
</html> | |
<?php |
This file contains hidden or 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 install -o root -g root -m 0600 /dev/null /swapfile | |
dd if=/dev/zero of=/swapfile bs=1k count=2048k | |
mkswap /swapfile | |
swapon /swapfile | |
echo "/swapfile swap swap auto 0 0" | sudo tee -a /etc/fstab | |
sudo sysctl -w vm.swappiness=10 | |
echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf |
This file contains hidden or 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 | |
UP=$(service mysql status|grep 'mysql start/running' | wc -l); | |
if [ "$UP" -ne 1 ]; | |
then | |
echo "MySQL is down."; | |
sudo service mysql start; | |
echo "MySQL has return"; | |
else | |
echo "All is well."; |
This file contains hidden or 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 | |
now="$(date +'%d_%m_%Y_%H_%M_%S')" | |
filename="db_backup_$now".gz | |
backupfolder="/home/ubuntu/backups" | |
fullpathbackupfile="$backupfolder/$filename" | |
logfile="$backupfolder/"backup_log_"$(date +'%Y_%m')".txt | |
echo "mysqldump started at $(date +'%d-%m-%Y %H:%M:%S')" >> "$logfile" | |
mysqldump --user=root --password=password --default-character-set=utf8 bd_vitekey_cloud | gzip > "$fullpathbackupfile" | |
echo "mysqldump finished at $(date +'%d-%m-%Y %H:%M:%S')" >> "$logfile" | |
echo "file permission changed" >> "$logfile" |
This file contains hidden or 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
$(window).scroll(function(){ | |
'use strict'; | |
if ( $(window).scrollTop() > 49 ) { | |
$("#nav").addClass("nav-fixed"); | |
} else { | |
$("#nav").removeClass("nav-fixed"); | |
} | |
This file contains hidden or 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
<h2>ASCII Animation Editor/Viewer</h2> | |
<table style="margin-left:auto;margin-right:auto"> | |
<tr><td style="text-align:center"> | |
Enter the frames below, separated by "<code>=====</code>".</td> | |
<td style="text-align:center"> | |
<input type="button" value="Play the Animation" onclick="PlayAnimation();"> | |
</tr> | |
<tr><td><textarea id="frameArea" rows=25 cols=55 style="font-size:8pt"> |
This file contains hidden or 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 bin/console doctrine:mapping:convert annotation ./src/AppBundle/Resources/config/doctrine/metadata/orm --from-database --force --filter="NombreDeTabla" |
OlderNewer