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
| section: screens | |
| # two hosts named: desktop and laptop | |
| # These are the nice names of the hosts to make it easy to write the config file | |
| # The aliases section below contain the "actual" names of the hosts (their hostnames) | |
| laptop: | |
| desktop: | |
| end | |
| section: links | |
| desktop: |
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 | |
| namespace Cid\FrontBundle\Entity; | |
| use Doctrine\ORM\Mapping as ORM; | |
| use Symfony\Component\Validator\Constraints as Assert; | |
| /** | |
| * Solicitud | |
| * |
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
| { | |
| "name": "symfony/framework-standard-edition", | |
| "description": "The \"Symfony Standard Edition\" distribution", | |
| "autoload": { | |
| "psr-0": { "": "src/" } | |
| }, | |
| "require": { | |
| "php": ">=5.3.3", | |
| "symfony/symfony": "2.1.*", | |
| "doctrine/orm": ">=2.2.3,<2.4-dev", |
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
| section: screens | |
| laptop: | |
| desktop: | |
| end | |
| section: links | |
| desktop: | |
| right = laptop | |
| # Desktop1 is to the right of Laptop |
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 | |
| backup_number=8 | |
| base_name="backup.gz" | |
| backup_path="/opt/somebackup/" | |
| cd $backup_path | |
| # clean any old temp backup |
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
| >>> map(lambda n: 1 << n, xrange(10)) | |
| [1, 2, 4, 8, 16, 32, 64, 128, 256, 512] | |
| >>> from math import pow | |
| >>> map(lambda n: pow(n, 2), xrange(10)) | |
| [0.0, 1.0, 4.0, 9.0, 16.0, 25.0, 36.0, 49.0, 64.0, 81.0] |
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
| import os | |
| import stat | |
| import shutil | |
| import subprocess | |
| # protected folders in /home | |
| DONT_DELETE = 'Department lost+found someguy'.split() | |
| def chmod_writable(func, path, excinfo): |
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
| # mkalias name "command param1 param2 etc.." | |
| # Example: mkalias srvfolder "python -m SimpleHTTPServer" | |
| mkalias () { | |
| echo "alias $1=\"$2\"" >> ~/.bashrc | |
| } |
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
| import subprocess | |
| command = subprocess.Popen( ["-c", "who | cut -d' ' -f1 | sort | uniq | grep -v root" ], stdout=subprocess.PIPE, shell=True ) | |
| users, err = command.communicate() |
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
| DOMAIN_NAME="domain-name" | |
| DOMAIN_USER='domain-user' | |
| DOMAIN_PASS='...pass..' | |
| # USAGE: | |
| # rd ( hostname | ip ) | |
| # rd winserver | |
| # rd 10.0.0.4 | |
| rd() |
OlderNewer