Data Exchange is going to use Stylus as its CSS preprocessor. Learn good style, and it will be your friend.
This guide includes content adapted from the Obvious Corporation's LESS style guide for Stylus.
cd /usr/src | |
wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz | |
tar -zxf openssl-1.0.1g.tar.gz | |
cd openssl-1.0.1g | |
./config | |
make | |
make test | |
make install | |
cd /usr/src | |
rm -rf openssl-1.0.1g.tar.gz |
#grab regular users with user id above 500 from /etc/passwd | |
awk -F: '$3 > 499' /etc/passwd > uid500+.txt | |
#extract username, create home directory, and apply home directory to user | |
for users in `awk -F: '{print $1}' uid500+.txt` | |
do | |
mkdir /home/$users | |
usermod -d /home/$users $users | |
chown $users:$users /home/$users | |
done |
#!/bin/sh | |
# Example: | |
# sh create_users.sh file_with_usernames.txt | |
if [ -z "$1"] # check if filename is given | |
then | |
echo "No input filename given, exiting." | |
else | |
while read NAME; do |
import os, sys | |
path = '/path/to/project' | |
settings_module = 'myapp.settings' | |
if path not in sys.path: | |
sys.path.append(path) | |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", settings_module) |
import win32api, win32com.client | |
import time, sys | |
# open a shell to type into | |
shell = win32com.client.Dispatch("WScript.Shell") | |
while True: | |
# just some dots to show that it's still running | |
sys.stdout.write('.') | |
sys.stdout.flush() |
''' | |
This script moves the largest file from each subdirectory into the | |
same directory that the script is run from. | |
Before: | |
/root | |
/episode1 | |
e1.avi | |
... | |
/episode2 |
Data Exchange is going to use Stylus as its CSS preprocessor. Learn good style, and it will be your friend.
This guide includes content adapted from the Obvious Corporation's LESS style guide for Stylus.
n = 5 | |
arr = [] | |
# populate array | |
for i in range(0, n): | |
arr.append([]) | |
for j in range(0, n): | |
arr[i].append(j) | |
# print before |
from tweepy import OAuthHandler | |
from tweepy.streaming import StreamListener | |
from tweepy import Stream | |
from tweepy import API | |
from cleverbot import Cleverbot | |
import json | |
import sys | |
consumer_key = "" |
for object in objects | |
object['place'] = object['@place'] |