Skip to content

Instantly share code, notes, and snippets.

View dansku's full-sized avatar
🌮
Focusing on tacos

Daniel Andrade dansku

🌮
Focusing on tacos
View GitHub Profile
set :application, 'my_app_name'
set :repo_url, 'git@example.com:me/my_repo.git'
set :branch, :master
set :deploy_to, -> { "/srv/www/#{fetch(:application)}" }
set :log_level, :info
set :linked_files, fetch(:linked_files, []).push('.env')
set :linked_dirs, fetch(:linked_dirs, []).push('web/app/uploads')
namespace :deploy do
desc 'Restart application'
@msurguy
msurguy / Instructions.md
Last active May 14, 2019 16:38
Daily reports in 5 minutes with Laravel and Morris.js

Follow this guide to integrate bar chart reports into your Laravel application. Reports like the following come with this guide:

  • Total number of Orders by day
  • Total number of Users subscribed by day
  • etc

The library used for the charts is: http://www.oesmith.co.uk/morris.js/

First put this into your page that will have the reports (in the Blade view) to include Morris library:

@mythmon
mythmon / sumo_db_import.sh
Created August 9, 2013 17:23
This is the script I use to set import a large database dump. It goes faster than simply piping into mysql.
#!/bin/bash
SCHEMA="support_mozilla_com.2013.07.17.schema.sql"
DATA="support_mozilla_com.2013.07.17.data.sql"
SIZE="$(du $DATA | awk '{ print $1 }')K"
DBNAME="kitsune"
{
echo "Dropping/creating database ${DBNAME}" >&2
echo "DROP DATABASE IF EXISTS ${DBNAME};"
@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 27, 2024 00:18
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname