Skip to content

Instantly share code, notes, and snippets.

View douglasresende's full-sized avatar
💡
I'll do my best

Douglas douglasresende

💡
I'll do my best
  • San Francisco, CA
View GitHub Profile
@jookyboi
jookyboi / javascript_resources.md
Created October 19, 2013 16:45
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@ambroisemaupate
ambroisemaupate / security.conf
Last active April 5, 2024 14:38
Nginx CSP example
# config to don't allow the browser to render the page inside an frame or iframe
# and avoid clickjacking http://en.wikipedia.org/wiki/Clickjacking
# if you need to allow [i]frames, you can use SAMEORIGIN or even set an uri with ALLOW-FROM uri
# https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options
add_header X-Frame-Options SAMEORIGIN;
# when serving user-supplied content, include a X-Content-Type-Options: nosniff header along with the Content-Type: header,
# to disable content-type sniffing on some browsers.
# https://www.owasp.org/index.php/List_of_useful_HTTP_headers
# currently suppoorted in IE > 8 http://blogs.msdn.com/b/ie/archive/2008/09/02/ie8-security-part-vi-beta-2-update.aspx
// ==UserScript==
// @name Unblur scribd.com
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://vi.scribd.com/*
// @grant none
// ==/UserScript==
(function() {
@maxivak
maxivak / readme.md
Last active January 12, 2024 06:53
Integrating Gem/Engine and Main Rails App
@MichaelBarney
MichaelBarney / MonsterLojaFufillment.js
Last active October 20, 2023 22:19
Exemplo de um 'fufillment' para ser usado no Dialogflow
'use strict';
const functions = require('firebase-functions');
const {WebhookClient} = require('dialogflow-fulfillment');
var nodemailer = require('nodemailer');
function enviarEmail(usuario, produto, quantidade){
// Configurações do Email
var transporter = nodemailer.createTransport({
service: 'gmail',
@metaskills
metaskills / wait_until.rb
Last active October 20, 2023 13:08
Never sleep() using Capybara!
# WAIT! Do consider that `wait` may not be needed. This article describes
# that reasoning. Please read it and make informed decisions.
# https://www.varvet.com/blog/why-wait_until-was-removed-from-capybara/
# Have you ever had to sleep() in Capybara-WebKit to wait for AJAX and/or CSS animations?
describe 'Modal' do
should 'display login errors' do
visit root_path
@balupton
balupton / README.md
Last active February 23, 2022 04:19
Convert XPS to PDF

Convert XPS to PDF on macOS

# IF you are on alpine, install the dependencies
apk add curl git bash

# IF you are on ubuntu, install the dependencies
apt update
apt install curl git bash
@devdrops
devdrops / readme.md
Last active November 10, 2021 16:56
tmuxinator sample

tmuxinator

  • Config sample (en_US)
  • Exemplo de configuração (pt_BR)
@chbrown
chbrown / _upgrade-pg9.4-to-pg9.5.md
Last active October 7, 2021 13:57
Upgrade PostgreSQL 9.4 to 9.5 on Mac OS X with Homebrew

First, check your current config (example output in homebrew.mxcl.postgresql.plist.xml lower down in this gist):

cat ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

Most importantly, note the -D /usr/local/var/postgres argument.

Second, shut down your current PostgreSQL.

launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
@makenova
makenova / IMfromsource.md
Last active November 3, 2020 22:33
Install ImageMagick from source on Ubuntu 14.04

Install ImageMagick from source on Ubuntu 14.04

Note

These notes were for a job I am no longer at and are very dated. Please go to the imagemagick website for updated instructions.

The version of ImageMagick that is installed when you run apt-get install imagemagick on Ubuntu 14.04 is older than I would like.

$ convert --version