Skip to content

Instantly share code, notes, and snippets.

View arcanoix's full-sized avatar
:octocat:
Developer Code Now Work

Gustavo Herrera arcanoix

:octocat:
Developer Code Now Work
View GitHub Profile
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@parmentf
parmentf / GitCommitEmoji.md
Last active April 3, 2026 15:15
Git Commit message Emoji
@gollum23
gollum23 / superlog
Created February 3, 2016 02:52
Superlog Curso git platzi
git config --global alias.superlog "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"
@andrei-cacio
andrei-cacio / react-native-setup-linux.md
Last active June 22, 2018 21:22
React native setup on Ubuntu/Linux

Guide for installing React Native on Linux (ubuntu 14.04)

Step 1: Install JDK 7

sudo apt-get install openjdk-7-jdk

Step 2: Download the Android SDK

@placidrod
placidrod / Laravel Restful jQuery Ajax Delete Record.php
Created April 2, 2016 06:29
Laravel Restful jQuery Ajax Delete Record
// route: route must go through 'web' middleware
Route::group(['middleware' => ['web']], function () {
Route::resource('post', 'PostsController');
});
// view: href link with token
<a href="{{ action('PostsController@destroy', ['id'=>$post->id]) }}"
data-token="{{ csrf_token() }}"
data-id="{{ $post->id }}"
class="delete-post-link"
@elib0
elib0 / template_repeater.js
Created May 4, 2016 19:38
Elementos dinámicos con jquery(Boton de agregar y eliminar los elementos)
$.on('click','.dinamic .add',function(e){
/* Elementos dinamicos. Solo es necesario agregar las clases dinamic, add y remove,
como se muestra en el ejemplo a continuacion:
<div class="dinamic">(contenedor)
<div>(elemento inicial)
<input/>
<button type="button" class="add">agregar</button>
</div>
<script class="template" type="text/x-jquery-tmpl">(plantilla de nuevo elemento)
<div>
@joseluisq
joseluisq / mysql_helpful_commands.md
Last active September 30, 2019 10:01
Some useful commands and scripts for MySQL.
@anthonygore
anthonygore / slack.js
Last active August 12, 2017 04:05
Send users a welcome message (IM) from the slackbot when they join your Slack team. Uses https://github.com/smallwins/slack so look at that first. Load this somewhere in a running Node JS app.
var slack = require('slack');
var bot = slack.rtm.client();
var token = "your_slack_token";
bot.team_join(function(obj) {
console.log("Team join triggered");
slack.chat.postMessage(
{
token: token,
channel: obj.user.id,
@drewjoh
drewjoh / Cors.php
Created June 13, 2016 22:47
Laravel CORS Middleware
<?php // /app/Http/Middleware/Cors.php
namespace App\Http\Middleware;
use Closure;
class Cors {
public function handle($request, Closure $next)
{
return $next($request)