http://www.gmodules.com/ig/proxy?url=http://www.whatismyip.com/
http://translate.google.com/translate?sl=ja&tl=en&u=http://example.com/
http://www.google.ie/gwt/x?u=http://example.com/
http://www.gmodules.com/ig/proxy?url=http://www.whatismyip.com/
http://translate.google.com/translate?sl=ja&tl=en&u=http://example.com/
http://www.google.ie/gwt/x?u=http://example.com/
#Install LXDE:
pacman -S openbox lxde gamin dbus #Lxde and needed dependancies pacman -S xorg-server xorg-xinit xorg-server-utils #Xorg pacman -S mesa xf86-video-fbdev xf86-video-vesa #Video Drivers #To use startx, you will need to define LXDE in your ~/.xinitrc file: echo “exec ck-launch-session startlxde” >> ~/.xinitrc
autologin & autostart LXDE
cp /usr/lib/systemd/system/getty@.service /etc/systemd/system/autologin@.service
Then in /etc/systemd/system/autologin@.service add your login insted of USER:
ExecStart=-/sbin/agetty --noclear -a USER %I 38400
Then:
# systemctl daemon-reload # systemctl disable getty@tty1 # systemctl enable autologin@tty1 # systemctl start autologin@tty1
Then:
cp /etc/skel/.bash_profile ~/.bash_profile
And then in this file add:
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx
Backup
pg_dump -U {user-name} {source_db} -f {dumpfilename.sql}
Restore
psql -U {user-name} -d {desintation_db} -f {dumpfilename.sql}
sudo pip install selenium sudo yum install gcc gcc-c++ make git openssl-devel freetype-devel fontconfig-devel wget https://phantomjs.googlecode.com/files/phantomjs-1.9.1-linux-x86_64.tar.bz2 tar -xjvf phantomjs-1.9.1-linux-x86_64.tar.bz2 sudo cp phantomjs-1.9.1-linux-x86_64/bin/phantomjs /usr/bin/
from selenium import webdriver driver = webdriver.PhantomJS() driver.set_window_size(1024, 768) driver.get('http://www.amazon.com/') driver.save_screenshot('screen.png') print driver.page_source driver.quit()
%systemroot%\system32\drivers\etc\
find . -name '*.pyc' -delete
PIE makes Internet Explorer 6-9 capable of rendering several of the most useful CSS3 decoration features.
CSS3 features:
IE7.js is a JavaScript library to make Microsoft Internet Explorer behave like a standards-compliant browser.
https://code.google.com/p/ie7-js/
Right click on layer in the layers panel and select duplicate layer. Select new document as destination.
New documet opens with only the selected layer.
From the main manu select Image then Trim then Based on transparent pixels and here we go.
links:
Using mod_wsgi when developing Django sites.
modwsgi – Monitoring For Code Changes
modify wsgi.py
add:
import cms_dict.monitor cms_dict.monitor.start(interval=1.0)
create monitor.py
import os import sys import time import signal import threading import atexit import Queue _interval = 1.0 _times = {} _files = [] _running = False _queue = Queue.Queue() _lock = threading.Lock() def _restart(path): _queue.put(True) prefix = 'monitor (pid=%d):' % os.getpid() print >> sys.stderr, '%s Change detected to \'%s\'.' % (prefix, path) print >> sys.stderr, '%s Triggering process restart.' % prefix os.kill(os.getpid(), signal.SIGINT) def _modified(path): try: # If path doesn't denote a file and were previously # tracking it, then it has been removed or the file type # has changed so force a restart. If not previously # tracking the file then we can ignore it as probably # pseudo reference such as when file extracted from a # collection of modules contained in a zip file. if not os.path.isfile(path): return path in _times # Check for when file last modified. mtime = os.stat(path).st_mtime if path not in _times: _times[path] = mtime # Force restart when modification time has changed, even # if time now older, as that could indicate older file # has been restored. if mtime != _times[path]: return True except: # If any exception occured, likely that file has been # been removed just before stat(), so force a restart. return True return False def _monitor(): while 1: # Check modification times on all files in sys.modules. for module in sys.modules.values(): if not hasattr(module, '__file__'): continue path = getattr(module, '__file__') if not path: continue if os.path.splitext(path)[1] in ['.pyc', '.pyo', '.pyd']: path = path[:-1] if _modified(path): return _restart(path) # Check modification times on files which have # specifically been registered for monitoring. for path in _files: if _modified(path): return _restart(path) # Go to sleep for specified interval. try: return _queue.get(timeout=_interval) except: pass _thread = threading.Thread(target=_monitor) _thread.setDaemon(True) def _exiting(): try: _queue.put(True) except: pass _thread.join() atexit.register(_exiting) def track(path): if not path in _files: _files.append(path) def start(interval=1.0): global _interval if interval < _interval: _interval = interval global _running _lock.acquire() if not _running: prefix = 'monitor (pid=%d):' % os.getpid() print >> sys.stderr, '%s Starting change monitor.' % prefix _running = True _thread.start() _lock.release()