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
<VirtualHost *> | |
ServerName versace.dev | |
DocumentRoot "/Users/teito/workspace/versace/web" | |
DirectoryIndex index.php | |
Alias /sf /Users/teito/workspace/versace/lib/vendor/symfony/data/web/sf/ | |
<Directory "/Users/teito/workspace/versace/lib/vendor/symfony/data/web/sf"> | |
AllowOverride All | |
#Allow from All |
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
AuthType Basic | |
AuthName "Restricted area" | |
AuthUserFile /path/to/httpdocs/web/.htpasswd | |
Require valid-user | |
Options +FollowSymLinks +ExecCGI | |
# video types | |
AddType video/mp4 .mp4 |
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
# chmod | |
chmod +a "_www allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs | |
chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs | |
# setfacl | |
setfacl -R -m u:www-data:rwX -m u:`whoami`:rwX app/cache app/logs | |
setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/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 | |
T="$(date +%s)" | |
sleep 2 | |
T="$(($(date +%s)-T))" | |
echo "Time in seconds: ${T}" |
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 | |
echo "Enter project name" | |
read PROJECT | |
DIRECTORY="/Users/teito/workspace/$PROJECT" | |
VHOST="/etc/apache2/extra/vhosts/$PROJECT.conf" |
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 | |
# include config | |
# config example below: | |
# | |
# | |
# Example deploy_config.sh | |
# | |
# dev_env() { |
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
/** | |
* Simple parallax helper: calls all registered callbacks with current scroll top as parameter. | |
*/ | |
var Parallax = (function () { | |
var windowWidth = null; | |
var windowHeight = null; | |
var y = null; | |
var y_norm = null; |
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
/* | |
* jQuery getPathToElement plugin calculates one of the | |
* jquery unique path to reach an element of the DOM. | |
* It will use id, classname or tagname to identify | |
* the element itself and all the parents up to the body or | |
* the first element with an unique ID. | |
* For human readability it is prefered a tagname + id or | |
* tagname + class for the element. and id or class or tagname | |
* for parents. | |
* It simply returns the array of element selectors, up to you |
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 | |
_dow="$(date +'%A'|cut -c 1-3)" | |
# dumps the database with day of the week appended | |
mysqldump mydb -u db-user -p'password' > "/home/ubuntu/databases/database-demo-${_dow,,}.sql" | |
# copies last db dumped | |
cp "/home/ubuntu/databases/database-demo-${_dow,,}.sql" /home/ubuntu/database-demo.sql |
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
int motorPins[] = {11, 10, 9, 8}; | |
int count = 0; | |
int count2 = 0; | |
int delayTime = 500; | |
int val = 0; | |
int ledPin = 13; | |
void setup() { | |
Serial.begin(9600); | |
pinMode(ledPin, OUTPUT); |
OlderNewer