For example, you want to set 40% alpha transparence to #000000
(black color), you need to add 66
like this #66000000
.
This file contains 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 | |
# Copyright (c) 2011 Josh Schreuder | |
# http://www.postteenageliving.com | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
#Django Test Database Error 1005 8/1/2015
Environment
- Django 1.8.3
- MySQL 5.5
When running python manage.py test
I was receiving the following error
This file contains 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
def color(text, **user_styles): | |
styles = { | |
# styles | |
'reset': '\033[0m', | |
'bold': '\033[01m', | |
'disabled': '\033[02m', | |
'underline': '\033[04m', | |
'reverse': '\033[07m', |
This file contains 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
#user nobody; | |
#Defines which Linux system user will own and run the Nginx server | |
worker_processes 1; | |
#Referes to single threaded process. Generally set to be equal to the number of CPUs or cores. | |
#error_log logs/error.log; #error_log logs/error.log notice; | |
#Specifies the file where server logs. |
This file contains 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 | |
# | |
# Author: Sameer Naik <[email protected]> | |
# Gist: https://gist.github.com/sameersbn/dd24dfdd13bc472d11a5 | |
# Short Url (raw): http://goo.gl/iJcvCP | |
# | |
# Installs a bunch of plugins for the docker-redmine image | |
# | |
# Usage: | |
# $ mkdir -p /opt/redmine/data/plugins |
This file contains 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/env bash | |
# gist at https://gist.github.com/miebach/7391024 | |
# save this file to .git/hooks/post-checkout | |
# and also to .git/hooks/post-merge | |
# and make it executable | |
# Delete .pyc files and empty directories from root of project | |
cd ./$(git rev-parse --show-cdup) |
This file contains 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
#Backup: | |
adb remount | |
adb pull /data/data/com.android.providers.telephony/databases/mmssms.db mmssms.db | |
#Restore: | |
adb remount | |
adb push mmssms.db /data/data/com.android.providers.telephony/databases/mmssms.db |
This file contains 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/python | |
#SSH into the new server, and run this from the home directory. Granted ~/public_html is the Apache DocumentRoot for | |
#the user | |
import getpass | |
import os | |
print '\nThis script will automate the process of moving a website from one server to another.' |
Here are a list of headless browsers that I know about:
- [HtmlUnit][1] - Java. Custom browser engine. JavaScript support/DOM emulated. Open source.
- [Ghost][2] - Python only. WebKit-based. Full JavaScript support. Open source.
- [Twill][3] - Python/command line. Custom browser engine. No JavaScript. Open source.
- [PhantomJS][4] - Command line/all platforms. WebKit-based. Full JavaScript support. Open source.
- [Awesomium][5] - C++/.Net/all platforms. Chromium-based. Full JavaScript support. Commercial/free.
- [SimpleBrowser][6] - .Net 4/C#. Custom browser engine. No JavaScript support. Open source.
- [ZombieJS][7] - Node.js. Custom browser engine. JavaScript support/emulated DOM. Open source.
- [EnvJS][8] - JavaScript via Java/Rhino. Custom browser engine. JavaScript support/emulated DOM. Open source.
NewerOlder