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
<?php | |
declare(strict_types=1); | |
use Migrations\AbstractMigration; | |
class RemoveUsernameFromUsers extends AbstractMigration | |
{ | |
/** | |
* Up Method. | |
* |
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
<?php | |
/** | |
* A simple class for accessing the Trakt API. You can use it like so: | |
* | |
* $trakt = new Trakt("You API Key"); | |
* $trakt->showSeasons("The Walking Dead", true); | |
* | |
* You can view the list of available API methods here: http://trakt.tv/api-docs | |
* To call a method, such as "search/movies", the ``Trakt`` class will respond | |
* to the corresponding method name "searchMovies". So, in the above example, the |
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.fn.comments = function( blnDeep ){ | |
var blnDeep = (blnDeep || false); | |
var jComments = $( [] ); | |
// Loop over each node to search its children for | |
// comment nodes and element nodes (if deep search). | |
this.each( | |
function( intI, objNode ){ | |
var objChildNode = objNode.firstChild; | |
var strParentID = $( this ).attr( "id" ); |
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
(function(console){ | |
console.save = function(data, filename){ | |
if(!data) { | |
console.error('Console.save: No data') | |
return; | |
} | |
if(!filename) filename = 'console.json' |
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 | |
# Improved as per feedback from @pascal - https://gist.github.com/julianxhokaxhiu/c0a8e813eabf9d6d9873#gistcomment-3086462 | |
find . -type f -iname "*.png" -exec optipng -nb -nc {} \; | |
find . -type f -iname "*.png" -exec advpng -z4 {} \; | |
find . -type f -iname "*.png" -exec pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow {} \; | |
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -exec jpegoptim -f --strip-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
################################################################################################ | |
# | |
# Script to organize pictures uploaded from Mobile Devices to Dropbox's Camera Upload folder | |
# | |
# Daniel Spillere Andrade - www.danielandrade.net | |
# | |
################################################################################################ | |
import os, time | |
import glob |
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
# Create your own fork/copy of the target repository using the FORK button. | |
# Clone/download it to local machine with… | |
$ git clone https://github.com/YOUR_USERNAME/REPO_NAME.git | |
# Check your local copy references | |
$ git remote -v | |
origin https://github.com/YOUR_USERNAME/REPO_NAME.git (fetch) | |
origin https://github.com/YOUR_USERNAME/REPO_NAME.git (push) |
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
Para quem quiser liberar Frete Grátis por cidade/região faça o seguinte: | |
Na administração do seu site clique na barra lateral esquerda em | |
WooCommerce>Configurações>Entrega>Entrega Local | |
1º Ative a entrega local | |
2º Altere o titulo para: Frete Grátis | |
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 -e | |
## | |
# WordPress Installation and VirtualHost Creation | |
# | |
# Description: Installs a WordPress website in the ~/Sites folder, creates a homepage, | |
# cleans up the WP install a bit, deletes the akismet and hello dolly plugins, creates the permalinks, | |
# clones the roots/sage theme framework to the theme folder, deletes all the other WP default themes, | |
# installs/runs npm and bower and runs gulp to create the initial assets, adds a custom gitignore file | |
# to /wp-content, installs the roots/soil plugin, creates a git repo in wp-content, saves the WordPress |
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
SUBSYSTEMS=="input", ATTRS{name}=="Keychron K2", RUN+="/bin/sh -c 'echo 0 > /sys/module/hid_apple/parameters/fnmode'" |
NewerOlder