Skip to content

Instantly share code, notes, and snippets.

@diegomaxdev
diegomaxdev / git.md
Last active Aug 18, 2019 — forked from leocomelli/git.md
Lista de comandos úteis do GIT
View git.md

GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

@me2resh
me2resh / SAM Template for creating API Gateway with AWS_IAM authorizer
Created Aug 18, 2019
SAM Template for creating API Gateway with AWS_IAM authorizer
View SAM Template for creating API Gateway with AWS_IAM authorizer
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
go-sam-bootstrap
SAM Template for creating API Gateway with AWS_IAM authorizer
##### Lambda Fuctions #####
Resources:
MyApi:
View user_playlists.py
import spotipy
from spotipy.oauth2 import SpotifyClientCredentials
with open('app_token.txt', 'r') as file:
tokens = file.read()
token_dict = json.loads(tokens)
client_credentials_manager = \
SpotifyClientCredentials(client_id=token_dict['client_id'],
View Output path comparison
nix-env failed:
error: while evaluating anonymous function at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/eval-2-shlevy.ewr1.nix.ci/.gc-of-borg-outpaths.nix:44:12, called from undefined position:
while evaluating anonymous function at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/eval-2-shlevy.ewr1.nix.ci/pkgs/top-level/release-lib.nix:121:6, called from /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/eval-2-shlevy.ewr1.nix.ci/lib/attrsets.nix:292:43:
while evaluating 'hydraJob' at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/eval-2-shlevy.ewr1.nix.ci/lib/customisation.nix:157:14, called from /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/eval-2-shlevy.ewr1.nix.ci/pkgs/top-level/release-lib.nix:121:14:
while evaluating the attribute 'drvPath' at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/eval-2-shlevy.ewr1.nix.ci/lib/customisation.nix:174:13:
while evaluating the a
@davidofferman
davidofferman / Dockerfile
Created Aug 18, 2019
Phalcon v3.4.x Dockerfile
View Dockerfile
FROM php:7.3-fpm
ENV PHALCON_RELEASE v3.4.3
RUN set -x \
&& apt-get update \
&& apt-get install -y gcc wget
RUN set -x \
&& mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \
@me2resh
me2resh / Presign API Gateway Requests
Created Aug 18, 2019
How to pre-sign AWS API gateway requests invoking lambdas
View Presign API Gateway Requests
<?php
use Aws\Credentials\Credentials;
use GuzzleHttp\Psr7\Request;
use Aws\Signature\SignatureV4;
use Aws\Sts\StsClient;
use GuzzleHttp\Client;
/**
* Sandbox is IAM profile with the user permissions to:
* 1- execute-api:Invoke against the API Gateway resource
View model-evaluation-and-refinement.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jcklpe
jcklpe / church.js
Created Aug 18, 2019 — forked from vivekhaldar/church.js
Church numerals in ES6.
View church.js
//#!/usr/bin/env node --harmony
/*jshint esversion: 6 */
'use strict';
// Church numerals in ES6.
// c.f. https://en.wikipedia.org/wiki/Church_encoding
// Zero is the identity function.
let zero = (f => x => x);
@shanem4
shanem4 / PY0101EN-1-1-Types.ipynb
Created Aug 18, 2019
Created on Cognitive Class Labs
View PY0101EN-1-1-Types.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.