Skip to content

Instantly share code, notes, and snippets.

@joseym
joseym / vagrantcheats.sh
Created February 18, 2012 04:47
SSH: Vagrant Aliases
# Vagrant Cheats
# ===========================
alias vup="vagrant up"
alias vh="vagrant halt"
alias vs="vagrant suspend"
alias vr="vagrant resume"
alias vrld="vagrant reload"
alias vssh="vagrant ssh"
alias vstat="vagrant status"
@devmatheus
devmatheus / console.php
Created August 25, 2016 19:50
Generate entity from table - Laravel 5.3
<?php
#path routes/console.php
Artisan::command('entity:generate', function () {
$modelName = $this->ask('Model Name');
$tableName = $this->ask('Table Name');
$fs = new Illuminate\Filesystem\Filesystem();
$pdo = DB::getPdo();
$ds = DIRECTORY_SEPARATOR;
@beaverb1ll
beaverb1ll / ExportChromePasswords.js
Last active January 18, 2017 12:00 — forked from cmatskas/ExportChromePasswords.js
ExportChromePasswords.js
var decryptedRow="";
var pm = PasswordManager.getInstance();
var model = pm.savedPasswordsList_.dataModel;
var pl = pm.savedPasswordsList_;
for(i=0;i<model.length;i++){
PasswordManager.requestShowPassword(i);
};
setTimeout(function(){
decryptedRow += '"hostname","username","password","formSubmitURL","httpRealm","usernameField","passwordField"';
for(i=0; i<model.length; i++){
@socieboy
socieboy / gulpfile.js
Created December 2, 2015 04:48
Gulpfile for AdminLTE and Laravel Elixier
var elixir = require('laravel-elixir');
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Laravel application. By default, we are compiling the Sass
| file for our application, as well as publishing vendor resources.
@ozero
ozero / Poitest.java
Created July 13, 2011 10:19
apache poi excel password test
package jp.ozero.poitest;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import org.apache.poi.hssf.record.crypto.Biff8EncryptionKey;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRichTextString;
@andrewjamesford
andrewjamesford / script.js
Created March 11, 2012 19:44
Code to invoke AJAX spinner using spin.js
var spinner;
function FireSpinner() {
var opts = {
lines: 12, // The number of lines to draw
length: 12, // The length of each line
width: 7, // The line thickness
radius: 23, // The radius of the inner circle
color: '#fff', // #rgb or #rrggbb
speed: 1, // Rounds per second
@php-coder
php-coder / Article.java
Created November 24, 2011 10:51
JPA @EntityListeners example
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
@tennox
tennox / elementary-fish-task-completion-notification.fish
Last active October 3, 2019 23:39
Elementary OS Loki Task complete notification for fish shell
# ! install xdotool first - it is needed to check if the terminal is in foreground (or disable that if you don't want)
# then append this to ~/.config/fish/config.fish (create it if not existent)
function alert_cmd_done --on-event fish_postexec
set status_code $status # save for later
set active_window (ps -p (xdotool getwindowpid (xdotool getactivewindow)) -o comm=) # get the process name of the currently active window
if status --is-interactive # Check for interactive session (keyboard attached)
if [ $active_window != "pantheon-termin" -a \
$CMD_DURATION -a \
$CMD_DURATION -gt (math "1000 * 5") ] # in background, after a job longer than 5 seconds
@vitorbritto
vitorbritto / makefile
Created July 6, 2016 12:47
Using makefile to run automated tasks
# MAKEFILE
#
# Autor: Vitor Britto
# Versão: 0.1.0
#
#
# Descrição:
# Arquivo para gerar um estrutura inicial para
# novos projetos e realizar tarefas de automação
#
@ratiw
ratiw / Laravel Homestead on Windows.md
Last active February 13, 2020 11:18
#Laravel #Homestead on #Windows

Problem with VirtualBox 4.3.12

It seems there is some problems between Vagrant 1.6.2 and VirtualBox 4.3.12 (the latest at the time or writing this), switching back to VirutalBox 4.3.6 or VirtualBox 4.3.8 seems to eliminate the problem.

update 1: Try both Vagrant 1.6.2 and VirtualBox 4.3.12 on Mac and they seem to work fine!

update 2: You need to enable Virtual Machine option in your BIOS to make VirtualBox work as expected. Saw someone mention about this in Laravel forum about this and it is true.

Also, Vagrant version should be 1.6.2.