Skip to content

Instantly share code, notes, and snippets.

View MiquelAdell's full-sized avatar

Miquel Adell MiquelAdell

View GitHub Profile
while sleep 2; do echo foo; done >> log.txt &
disown
tail -f log.txt
#ara es pot tancar el terminal
$colorHues: (
-green: #90cc2c,
-orange: #fe610e,
-pink: #ed1e57,
-teal: #159d86
);
$colorNames: ("green") ("orange") ("pink") ("teal");
$green: map-get($colorHues, "-green");
#!/usr/bin/env bash
# drop the database
# this step relies on having a WP CLI installed and configured but one could
# use any other method to get the database
wp @dev db export --add-drop-table dev_database.sql
(cd htdocs/wp-content/themes/project-name; yarn build:production)
@MiquelAdell
MiquelAdell / straight-solar-rail-narrow
Created July 27, 2018 09:28
Straight Solar Rail Narrow
0eNqdmNluo0AQRf+lnyGiN7bfyOMoGhHcyrTEJgzRWJb/fbAdBWd82+HmyWLpQ93roqqao3htZjeMvptEeRS+7ru9KH8dxd6/dVVzPjcdBidK4SfXikh0VXs+GivfiFMkfLdzf0UpTxFY8u7HaV7OfK663hE/36xUcOXXh7Vu5+c2do2rp9HX8dA37gahNyD2fVON8VB17jZsc3qJhOsmP3l3lX05OPzu5vbVjYuuFTAtkt/+TPFFeSSGfr+s6rvzExdSbCJxWH5kejpH8x9GwTjuIfLJfmDsk0UgvYLaqmnipmqHe07yHcZ8+R/jD+8ecFLMsVvtUY/cSWmTDcJkG01eVSmsKmdVwXAKWpVCGJmw0WAMn8kJ5CjW5QKbLPXj1/ueqL4jGtYprNCyTuUQk256VVdVeUDVmtZVXc/t3FRTPyLQFZNBSL4NkjxiFKS90BaVsO7igio5V6C1SlGuYIYmXcFyDOsKLDnKsn0mUAFVSqrC4WSsKli6VE5WirXAB9SxmQzD0mwmw2qjJVlPk8BgoDhNOBhNSsLGGDILdUASOV3gYNjhAmayzrhQMCQnQ4GlQhdcXwlNgAmZd4EJ0MiftvEQkExkaJJhExn2KrNxTP6UlC2SIrHz4+LA5bJBVEu1rgJGljKdCyPIlMYOsSmNRy5TUJZICfciCeNJgCE5U7Acq1hXYOmymqyjMlBILTkYB8Jh52K8LbIptYUNasp+OBRIEwCSu76zupfo+pWhvPmIEol3N+4vd6d5plQuiyRbDP0HwGyx9A==
@MiquelAdell
MiquelAdell / straight-solar-rail-wide
Created July 27, 2018 09:27
Straight Solar Rail Wide
0eNqVmNtuozAQht/F11CBbQ7hNXq5qiontbqWOAlMtVGUdy8ku5tk9zfhv4qImA/P8DEeOIl9Pdl+cK0X1Um4Q9eOovpxEqP7bE29/OePvRWVcN42IhKtaZajwbhanCPh2g/7S1TpOQIhX27w0/zP36jrGfHrXaSEkY8XG7vaDHFvWnt/TbUh0hwOUzPVxnfDXaQ+v0XCtt55Z6/ZXg6O7+3U7O0wp3O7tJ8z/fzp40vCkei7cY7q2uWKMynWkTjOP2l+XlbzD0bCdfwPkWsQtQ2SrDH0NsbqOrKtNVktSU5XViNMQVYWQsrbWqb96M0lMFhYiNhxhYWMNGErizG8tBJyWGsxhdQWQ0hvMYQWF2N4cxPIuak7Nqau49o0PYCkL9kfzEsGQeVDM45/d0Jwnx5Ikfhwgz1cT9CIu4N9d2WFJV6gTLaBnnLSTRV7WjAptxVMPgUp1ihogtSsUSXEsH5jCq033vEKVp4sUOOSlCfE2ZHVwXtwwlYHtmiVstWROCslyeqEOKzJOC1aZNhhFSsyprAiw2dTcQMGZpTMFogR1HwBEZqcLjCEnS3grdHcZIEZihjaMIEaKjCCNBVDWFHhs6fZhqtxJ9Bkvw1hyHYLc8rYbovfV9hmW+CUMrLXhjBkq8U5sZ0W7vUZqS+GsPriIShj/Q0NZRkpcJBDGozTylmF8UtHzjqcKpxVTkoc5JAWB9JiNcZvvDnp8UJ5i65fiKq7716R+LLDeDk7Lwspy3SXFPPCvwFCST9x

#example errors

Error: src/sass/utilities/mixins/_vendor-prefixes.scss
Error: Invalid CSS after "::-webkit-": expected "{", was "&-placeholder"

       "&-placeholder" may only be used at the beginning of a compound selector.
        on line 116 of src/sass/utilities/mixins/_vendor-prefixes.scss

Error: src/sass/base/_base.scss
Error: "ul" failed to @extend "%reset-list".
<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');
@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 {} ";"
@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/', 
    
#!/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