Skip to content

Instantly share code, notes, and snippets.

View MiquelAdell's full-sized avatar

Miquel Adell MiquelAdell

View GitHub Profile
daemon off;
worker_processes 1;
events { worker_connections 1024; }
http {
sendfile on;
gzip on;
$.getScript('/app/themes/cordills/dist/scripts/animation.gsap.js', function() {
//// SCROLL MAGIC
var controller = new ScrollMagic.Controller({globalSceneOptions: {triggerHook: "onEnter", duration: "200%"}});
// build scenes
new ScrollMagic.Scene({triggerElement: "#parallax1"})
.setTween("#parallax1 > div", {y: "80%", ease: Linear.easeNone})
.addTo(controller);
new ScrollMagic.Scene({triggerElement: "#parallax2"})
{
"name": "sage",
"homepage": "https://roots.io/sage/",
"authors": [
"Ben Word <ben@benword.com>"
],
"license": "MIT",
"private": true,
"dependencies": {
"bootstrap-sass": "3.3.6",
# install ansible
sudo apt-get install software-properties-common -y
sudo apt-add-repository ppa:ansible/ansible -y
sudo apt-get update -y
sudo apt-get install ansible -y
# install virtual box
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian trusty contrib" >> /etc/apt/sources.list.d/virtualbox.list'
sudo apt-get update -y
@MiquelAdell
MiquelAdell / instructions.md
Last active March 2, 2016 15:40
how to develop on cordills
  1. set up a regular VVV You could set some other environment but the migration sql assumes:

    local.wordpress.dev as a host

and

  /srv/www/wordpress-default

as the path to the files

#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )";
USER="miqueladell";
GROUP="www-data";
# Make sure only root can run our script
function execute {
printf "$1\n";
if eval "$1"; then
printf " \e[32;1mOK\033[0m\n";
#!/usr/bin/env bash
SERVER=vps282893.ovh.net
EXCLUDE_LIST=false;
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )";
if [ "$#" -ne 2 ]; then
printf "Usage: upload.sh \e[33;1mname_of_the_directory_on_local_machine\033[0m \e[33;1mname_of_the_directory_on_remote_machine\033[0m\n" 1>&2;
exit 1
fi
@MiquelAdell
MiquelAdell / sassify.md
Last active December 1, 2016 01:01
how to add sass to an existing WordPress Theme

npm install --save-dev jshint gulp-jshint

Base directory: theme/

  • Copy latest gulpfile.js

  • search for

      proxy: 'http://domain.dev/', 
    
@MiquelAdell
MiquelAdell / wordpress-permissions.sh
Last active July 26, 2017 12:49
ultra-basic WordPress permissions
#!/usr/bin/env bash
find . \! -perm 644 -type f -exec chmod 644 {} ";"
find . \! -perm 755 -type d -exec chmod 755 {} ";"
find . -name 'wp-config.php' -exec chmod 600 {} ";"
<script>
$(document).ready(function() {
var lock = false; // variable to lock changes while running the function;
$('#question'+{QID}+' input:checkbox').change(function(event){
if( lock ){
event.preventDefault();
return;
}
var checkbox = $(this);
var td = checkbox.closest('td');