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
# To free pagecache: | |
# echo 1 > /proc/sys/vm/drop_caches | |
# To free dentries and inodes: | |
# echo 2 > /proc/sys/vm/drop_caches | |
# To free pagecache, dentries and inodes: | |
# echo 3 > /proc/sys/vm/drop_caches | |
sudo sync && sudo sysctl -w vm.drop_caches=3 |
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 random, os | |
def main(): | |
while(True): | |
print "Press enter to choose who is gonna sleep on the shitty bed." | |
c = raw_input() | |
if c == ".exit": | |
break | |
else: |
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
@echo off | |
cd %USERPROFILE%/Desktop/Projects/Bandicoot 2/env/Scripts | |
call activate.bat | |
cd %USERPROFILE%/Desktop/Projects/Bandicoot 2 | |
IF "%1"=="public" GOTO PUBLIC | |
python manage.py runserver | |
:PUBLIC: | |
python manage.py runserver --host 0.0.0.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
from fabric.api import run,settings | |
import time, datetime | |
# host="x.x.x.x" | |
def redis(): | |
with settings(warn_only=True, host_string=host, user="server1", key_filename="cert.pem"): | |
r = run("redis-cli ping", True) | |
if r == "PONG": |
NewerOlder