This file contains hidden or 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 | |
# Variables | |
client_id="" | |
client_secret="" | |
scopes="" | |
auth_code="" | |
access_token="" |
This file contains hidden or 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
/** | |
* Console-friendly function to batch update 301 redirects in Webflow. | |
* Existing redirects will be replaced when source matches but target doesn't. | |
* A rule w/ an empty target will remove existing matches but not replace them. | |
* Small wait time between each add/remove to allow ajax calls time to finish. | |
* Intended for use here: https://webflow.com/dashboard/sites/YOURSITE/hosting | |
* @example updateWebflowRedirects( [{ source: "/old", target: "/new" }] ); | |
*/ | |
async function updateWebflowRedirects(rules) { |
This file contains hidden or 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
APP_URL=http://www.myproject.test | |
DB_CONNECTION=mysql | |
DB_HOST=localhost | |
DB_PORT=3306 | |
DB_DATABASE=myprojectdb | |
DB_USERNAME=homestead | |
DB_PASSWORD=secret | |
MAIL_DRIVER=smtp |
This file contains hidden or 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
let glob = require('glob'); | |
let mix = require('laravel-mix'); | |
let webpackMerge = require('webpack-merge'); | |
/** | |
* Laravel Mix extension for code splitting custom JS similar to extract() for vendor modules. | |
* @author @dccampbell | |
* @example mix.extractJs('/resources/js/api.js', 'public/js') | |
* @example mix.extractJs('/resources/js/store/*', 'public/js/store.js') | |
* @example mix.extractJs(['/js/lib.js', '/js/lib.*.js'], 'public/js/lib.js') |
This file contains hidden or 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 | |
set -e | |
git fetch --all --prune | |
localBranches=$(git branch --merged origin/master | sed 's/^[ *]\+//' | grep -v '^master$' || echo '') | |
if [[ -z "$localBranches" ]]; then | |
echo "No local merged branches found." |
This file contains hidden or 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 | |
# Ask for the administrator password upfront | |
sudo -v | |
# Install Homebrew | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" || exit 1 | |
# Configure Homebrew | |
brew doctor |
This file contains hidden or 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 | |
set -e -x | |
# Variables | |
INSTALL_DIR="/opt/firefox-dev" | |
TEMP_FILE="$HOME/Downloads/firefox-dev.tar.bz2" | |
MENU_FILE="$HOME/.local/share/applications/firefox-dev.desktop" | |
BIN_DIR="$HOME/bin" | |
# Prepare |
This file contains hidden or 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
# Variables | |
COMPOSER_HOME="$HOME/.composer" | |
HOSTS='/etc/hosts' | |
VHOST='/etc/apache2/sites-available/localdev.conf' | |
ERRLOG='/var/log/apache2/error.log' | |
# Fix SSH xterm-256color issue | |
alias ssh='TERM=xterm-color ssh' | |
# File Shortcuts |
This file contains hidden or 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
// https://www.facebook.com/ads/preferences/ | |
function loadAllAdvertisers() { | |
if(!document.querySelector('#interacted ._45ys')) { | |
document.querySelector('#interacted div[role=button]').click(); | |
} | |
window.interactedInterval = setInterval(function() { | |
var moreBtn = document.querySelector('#interacted ._45yr'); | |
if(moreBtn) { | |
document.querySelector('#interacted ._45yr').click(); |
This file contains hidden or 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 | |
/** | |
* Dynamic Wordpress Configuration File | |
* | |
* This config file is designed to be flexible for use in any environment without need for modification. | |
* It exposes most configurations to being set externally, such as via SetEnv in Apache/htaccess or PHP's putenv(). | |
* | |
* It will optionally load a /env.php file. If the file returns an array, the key/values will be loaded using putenv(). | |
* |
NewerOlder