Skip to content

Instantly share code, notes, and snippets.

View degt's full-sized avatar
⛱️
Le vent se lève, il faut tenter de vivre.

Daniel Gutiérrez degt

⛱️
Le vent se lève, il faut tenter de vivre.
View GitHub Profile
@degt
degt / Grunt.js
Last active August 29, 2015 14:22
Grunt.js for laravel 5
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
config:{
themeName: 'mythemename',
themePath: 'public',
assetsPath: 'resources/assets',
bowerPath: 'bower_components'
@degt
degt / gist:936905a2f933da81e514
Created July 2, 2015 02:12
Mysql dump table without data
mysqldump -u root -p --no-data databasename tablename > filename.sql
#!/bin/bash -e
# brew install imagemagick
# Ensure we're running in location of script.
cd "`dirname $0`"
for f in *; do
if [[ $f == *@3x* ]];
then
echo "$f -> ${f//@3x/@2x}, ${f//@3x/}"
@degt
degt / UINavigationBar+Height.swift
Created October 22, 2015 23:43 — forked from siberianisaev/UINavigationBar+Height.swift
Change height of UINavigationBar
import Foundation
private var AssociatedObjectHandle: UInt8 = 0
extension UINavigationBar {
var height: CGFloat {
get {
if let h = objc_getAssociatedObject(self, &AssociatedObjectHandle) as? CGFloat {
#run php server from terminal
sudo php -S <domain>:<port>
@degt
degt / Laravel 4.sh
Last active December 17, 2015 03:48
//Install laravel 4
git clone -b develop git://github.com/laravel/laravel.git .
//Run Server
//sudo php -S domain.dev:80
sudo php -S domain.dev:80 -t public/
php artisan serve
//Exec autoload
composer dump-auto
//
// NSMutableDictionary+Utilities.h
//
// Created by Daniel Gutierrez on 11/26/13.
//
#import <Foundation/Foundation.h>
@interface NSMutableDictionary (Utilities)
@degt
degt / Gruntfile.js
Last active February 5, 2016 14:20
Gruntjs workflow
module.exports = function(grunt) {
// set up grunt
};
@degt
degt / s-templates.json
Last active May 2, 2016 01:33
Serverless API Rest templates
{
"_comment": "Api Rest templates",
"restGet": {
"application/json": {
"method": "$context.httpMethod"
}
},
"restPost": {
"application/json": "{\n\"method\": \"$context.httpMethod\",\n\"body\": $input.json('$')\n}"
},
@degt
degt / policy.json
Created July 13, 2016 16:51
List a single s3 bucket on Amazon
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::my-bucket"
},
{
"Effect": "Allow",