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/bash | |
# dpkg -l : Lista todos los paquetes instalados en el sistema. | |
# grep -i -e : Filtra los paquetes (grep) ignorando si son mayúsculas o minúsculas (-i) en base a un patrón (-e). | |
# awk ‘{print $2}’ : Mostramos sólo la segunda columna. | |
# > paquetes.txt : Redirigimos la salida al archivo de texto paquetes.txt. | |
dpkg -l | grep -i -e LXDE -e X11 -e "xserver" -e desktop -e gtk -e alsa | awk '{print $2}' > paquetes.txt | |
sudo apt-get remove $(cat paquetes.txt) |
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/bash | |
# Shell para la instalacion de qgis junto con el servidor | |
# Load public keys for qgis repository | |
sudo gpg --recv-key DD45F6C3 | |
sudo gpg --export --armor DD45F6C3 | sudo apt-key add - | |
# upgrade system packages |
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 | |
# ø | |
# Run this script as root | |
# Installs Java here: /usr/lib/jvm/java-8-oracle | |
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" > /etc/apt/sources.list.d/webupd8team-java.list | |
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" >> /etc/apt/sources.list.d/webupd8team-java.list | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886 | |
apt-get update | |
apt-get -y install oracle-java8-installer | |
java -version |
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 | |
# Run this script as root | |
# Build for debian jessie (tested in 8.6) | |
# source: https://docs.docker.com/engine/installation/linux/debian/#/debian-jessie-80-64-bit | |
apt-get purge -y "lxc-docker*" | |
apt-get purge -y "docker.io*" | |
apt-get update | |
apt-get install -y apt-transport-https ca-certificates |
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
# Force SSL | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
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 | |
git remote add origin https://github.com/yourname/my_project.git | |
git pull origin master | |
git add --all | |
git commit -m "[UPDATE] conflictive files" | |
git push origin master |
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 | |
# Simple loop copy - not recursive | |
function loop_copy($array) { | |
$object = new stdClass(); | |
foreach ($array as $key => $value) { | |
$object->$key = $value; | |
} | |
} |
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
SELECT | |
T0.client_id, name, exts, vms, ivrs, queues, conf10, conf20, conf30 | |
FROM | |
vw_clients T0 | |
left join vw_exts T1 on T0.client_Id=T1.client_id | |
Left join vw_vms T2 on ... | |
... | |
Where ... |
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
Show hidden characters
{ | |
"rename_default": "<filepath>" | |
} |
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
var source = '\x53\x6f\x72\x72\x79\x21\x20You\x72 \x6be\x79\x20\x66\x69l\x65\x20\x69s i\x6eva\x6ci\x64\x2e'; | |
var decoded = source.replace(/\\x([a-f0-9][a-f0-9])/g, function(a,b) { | |
return String.fromCharCode(parseInt(b, 16)); | |
}); | |
document.write(decoded); |