Skip to content

Instantly share code, notes, and snippets.

@hardevine
hardevine / enc_dec_bcrypt.php
Last active December 6, 2019 06:30
bcrypt enc dec outside l
<?php
$value = 'passs';
$d = password_hash($value, PASSWORD_BCRYPT, [
'cost' => 10,
]);
echo $d;
$enc = "$2y$10$/5axuHxOPVuTmdJTrOe8w.9DsSd7ZSt0.uL6qREo/zyei8FAYb5fu";
@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

service nfslock stop
chkconfig nfslock off
service rpcidmapd stop
chkconfig rpcidmapd off
service portreserve stop
chkconfig portreserve off
service rpcbind stop
alias cd..='cd ..'
alias ..='cd ..'
alias ...='cd ../../../'
alias ....='cd ../../../../'
alias .....='cd ../../../../'
alias .4='cd ../../../../'
alias .5='cd ../../../../..'
alias h='history'
alias path='echo -e ${PATH//:/\\n}'
alias now='date +"%T'
@hardevine
hardevine / artisan-command.php
Created July 20, 2014 09:38
enable ANSI colors in artisan commands forcefully
<?php
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
class TestCommand extends Command {
/**
* The console command name.
// Demo using DHCP and DNS to perform a web client request.
// 2011-06-08 <jc@wippler.nl> http://opensource.org/licenses/mit-license.php
#include <EtherCard.h>
// ethernet interface mac address, must be unique on the LAN
static byte mymac[] = { 0x74,0x69,0x69,0x2D,0x30,0x31 };
static byte myip[] = { 10,0,0,36 };
static byte mymask[] = { 255,255,255,0 };
static byte gwip[] = { 10,0,0,100 };
<!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">
<?php
use App;
use Log;
class InsertNewBookLogger {
public function log(Request $request) {
if (App::environment('local'))
{