Skip to content

Instantly share code, notes, and snippets.

@hardevine
hardevine / scrape_with_logs.py
Created September 9, 2021 09:56 — forked from rengler33/scrape_with_logs.py
How to Capture Network Traffic When Scraping with Selenium & Python
# 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
@hardevine
hardevine / wait_for_reload.php
Created August 12, 2020 16:31 — forked from calebporzio/wait_for_reload.php
Simple Laravel Dusk macro that waits for a page change
<?php
// Define in some ServiceProvider
Browser::macro('waitForReload', function () {
$this->script("window.duskPageIsStale = {}");
return $this->waitUntil("return typeof window.duskPageIsStale === 'undefined';");
});
// Usage:
@hardevine
hardevine / LaravelCookieDecrypter.php
Created May 4, 2020 10:27 — forked from glennkarlsen/LaravelCookieDecrypter.php
Decrypt laravel_session outside of the Laravel app. This is just a proof of concept, cleanup and extend to your needs.
<?php
class LaravelCookieDecrypter {
/**
* The encryption key.
*
* @var string
*/
protected $key = 'YOUR LARAVEL .ENV APP KEY';
@hardevine
hardevine / .gitignore
Created May 4, 2020 07:03 — forked from sendoa/.gitignore
Sendoa's .gitignore for Laravel+PHPStorm projects
/node_modules
/public/storage
/storage/*.key
/vendor
Homestead.yaml
Homestead.json
.env
# ====== OS X ===========================================
.DS_Store
@hardevine
hardevine / latest-ffmpeg-centos6.sh
Last active March 26, 2020 13:36 — forked from mustafaturan/latest-ffmpeg-centos6.sh
Installs latest ffmpeg on Centos 6
# 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
@hardevine
hardevine / errorHandler.js
Created March 14, 2020 05:53 — forked from saqueib/errorHandler.js
Global error handling using axios interceptor for http calls http://www.qcode.in/api-error-handling-in-vue-with-axios
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
@hardevine
hardevine / SkipVerification.txt
Created December 9, 2019 12:05 — forked from ygit/SkipVerification.txt
Skip Verification of Mac Apps
xattr -d com.apple.quarantine /path/to/app/myMacApp.app
@hardevine
hardevine / deploy.sh
Created June 17, 2018 14:24 — forked from BenSampo/deploy.sh
Laravel deploy script
# Change to the project directory
cd /home/forge/domain.com
# Turn on maintenance mode
php artisan down
# Pull the latest changes from the git repository
git pull origin master
# Install/update composer dependecies
@hardevine
hardevine / engenius-eap600-enable-ssh.md
Created March 6, 2017 11:07 — forked from darconeous/engenius-eap600-enable-ssh.md
Enabling SSH on Engenius EAP600

Enabling SSH on Engenius EAP600

This tutorial will walk you through the steps needed to get root SSH access on an [Engenius EAP600][1] dual-band WiFi access point. SSH doesn't come enabled out of the box on these things, so if you want to SSH into the device (which is running an old version of OpenWRT), keep reading.

Picture of EAP600

<!DOCTYPE html>
<html>
<head>
<link href="http://code.jquery.com/ui/1.9.2/themes/smoothness/jquery-ui.css" rel="stylesheet" type="text/css" />
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
<script src="http://www.jawish.org/blog/uploads/jquery.gdocsviewer.min.js"></script>
<!-- <script src="http://www.jawish.org/blog/uploads/jquery.zohoviewer.min.js"></script> -->
<meta charset="utf-8">