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
$http.jsonp('{{ site.url }}/posts.json?callback=JSON_CALLBACK').then(function (res) {
$scope.posts = res.data;
}, function (error) {
console.log(error);
});
@degt
degt / ie9.sh
Created August 8, 2016 14:12
Run Windows + iE9 on Virtual Machine
curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | IEVMS_VERSIONS="9" bash
@degt
degt / website-policy.json
Created July 13, 2016 16:52
Website amazon s3 policy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::my-bucket/*"
}
]
@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",
@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 / 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 {
#!/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 / gist:936905a2f933da81e514
Created July 2, 2015 02:12
Mysql dump table without data
mysqldump -u root -p --no-data databasename tablename > filename.sql
@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'
rsync -a --progress <folder> <target>