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
@rhernandog
rhernandog / regiones-provincias-comunas.json
Last active October 14, 2021 14:40
Archivo en formato JSON con las regiones de Chile, sus provincias y las respectivas comunas de cada provincia.
[
{
"region": "Arica y Parinacota",
"region_number": "XV",
"region_iso_3166_2": "CL-AP",
"provincias": [
{
"name": "Arica",
"comunas": [
{
@apaatsio
apaatsio / dynamodb-rest-api-lambda.js
Last active September 13, 2019 16:13
Single Lambda function for all CRUD operations with DynamoDB in REST API
console.log('Loading function');
var doc = require('dynamodb-doc');
var dynamo = new doc.DynamoDB();
/**
* Provide an event that contains the following keys:
*
* - operation: one of the operations in the switch statement below
* - tableName: required for operations that interact with DynamoDB
@harrisonde
harrisonde / gist:90431ed357cc93e12b51
Last active May 24, 2021 22:01
Deploy Laravel 5 applications on AWS Elastic Beanstalk
# The following script will deploy a Laravel 5 applicaion on AWS Elastic Beanstalk.
# Add to .ebextensions at the root of your application and name your commands file (e.g., commands.config)
# -------------------------------- Commands ------------------------------------
# Use "commands" key to execute commands on the EC2 instance. The commands are
# processed in alphabetical order by name, and they run before the application
# and web server are set up and the application version file is extracted.
# ------------------------------------------------------------------------------
commands:
01updateComposer:
@franquis
franquis / PostController.php
Last active February 4, 2023 03:12
Summernote image upload with PHP (Laravel + Intervention\lmage)
<?php
/**
* This exemple shows how to parse base64 encoded images (submitted using Summernote), save them locally
* and replace the 'src' attribute in the submited HTML content
*
**/
use Intervention\Image\ImageManagerStatic as Image;
class PostController {
public function edit(){
@allaniftrue
allaniftrue / filters.php
Last active March 16, 2019 19:00
Laravel Minify HTML response
<?php
/*
* An improvised Gist from
* https://gist.github.com/zmsaunders/5619519
* https://gist.github.com/garagesocial/6059962
*/
App::after(function($request, $response)
{
if(App::Environment() != 'local')
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 19, 2024 11:00
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@abarza
abarza / Default New Doc Sizes.doc
Last active December 10, 2015 17:48
Document presets for Photoshop, replacing the default values given by the software with the Android and iOS screen sizes.
;------------------------------------------------------------------------------
; Generic mobile device sizes
;------------------------------------------------------------------------------
"mobile"
"Android LDPI Small QVGA" 240 320 pixels 120 dpi RGB 8 1.0 white "none"
"Android LDPI Normal WQVGA400" 240 400 pixels 120 dpi RGB 8 1.0 white "none"
"Android LDPI Normal WQVGA432" 240 432 pixels 120 dpi RGB 8 1.0 white "none"
"Android LDPI Extra Large" 1024 600 pixels 120 dpi RGB 8 1.0 white "none"
@nolim1t
nolim1t / home.jade
Created May 11, 2012 05:19
Sample Templating with express and jade
h2 Hello World
h3 Hello World
:markdown
This is some **test** markdown text
we can even link to [stuff](http://google.com)
ul.list
- each i in data
li=i.name
@travishaynes
travishaynes / google_fonts_helper.rb
Created January 10, 2012 18:51
Google Fonts Rails helper
module GoogleFontsHelper
# generates a link tag for Google fonts
# @param [Hash] fonts contains the font families and weights
# @return [String] The generated link tag
# @example Droid+Sans in weights 400 and 700, and Yanone+Kaffeesatz in 300 and 400
# = google_fonts_link_tag :droid_sans => [400, 700], :yanone_kaffeesatz => [300, 400]
def google_fonts_link_tag(fonts = {})
family = fonts.inject([]) do |result, (font, sizes)|
# convert font into a String
font = font.to_s
@mudge
mudge / gist:221616
Created October 29, 2009 17:17
A simple rich text editor with jQuery and iframe designMode.
/*
* A very basic rich text editor using jQuery and iframe designMode.
*
* In your HTML...
* <input type="hidden" id="article_body" name="article[body]">
* <iframe id="paste"></iframe>
*/
/*
* NOTE: The order of writing and setting designMode is very important.