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
# see rkengler.com for related blog post | |
# https://www.rkengler.com/how-to-capture-network-traffic-when-scraping-with-selenium-and-python/ | |
import json | |
import pprint | |
from selenium import webdriver | |
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities | |
capabilities = DesiredCapabilities.CHROME |
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 | |
// Define in some ServiceProvider | |
Browser::macro('waitForReload', function () { | |
$this->script("window.duskPageIsStale = {}"); | |
return $this->waitUntil("return typeof window.duskPageIsStale === 'undefined';"); | |
}); | |
// Usage: |
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
/node_modules | |
/public/storage | |
/storage/*.key | |
/vendor | |
Homestead.yaml | |
Homestead.json | |
.env | |
# ====== OS X =========================================== | |
.DS_Store |
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
# source: https://trac.ffmpeg.org/wiki/CentosCompilationGuide | |
yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel | |
mkdir ~/ffmpeg_sources | |
cd ~/ffmpeg_sources | |
curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz | |
tar xzvf yasm-1.2.0.tar.gz | |
cd yasm-1.2.0 |
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
import axios from 'axios' | |
import toast from './toast' | |
function errorResponseHandler(error) { | |
// check for errorHandle config | |
if( error.config.hasOwnProperty('errorHandle') && error.config.errorHandle === false ) { | |
return Promise.reject(error); | |
} | |
// if has response show the error |
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
// https://stackoverflow.com/questions/16104078/appending-array-to-formdata-and-send-via-ajax/28434829#28434829 |
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
// https://stackoverflow.com/questions/17066875/how-to-inspect-formdata | |
var myFormData = { | |
key1: 300, | |
key2: 'hello world' | |
}; | |
var fd = new FormData(); | |
for (var key in myFormData) { | |
console.log(key, myFormData[key]); | |
fd.append(key, myFormData[key]); |
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 | |
// Snippet from PHP Share: http://www.phpshare.org | |
function formatSizeUnits($bytes) | |
{ | |
if ($bytes >= 1073741824) | |
{ | |
$bytes = number_format($bytes / 1073741824, 2) . ' GB'; | |
} | |
elseif ($bytes >= 1048576) |
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
xattr -d com.apple.quarantine /path/to/app/myMacApp.app |
NewerOlder