I no longer mantain this list. There are lots of other very comprehensive JavaScript link lists out there. Please see those, instead (Google "awesome JavaScript" for a start).
/* Ultra lightweight Github REST Client */ | |
// original inspiration via https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb | |
const token = 'github-token-here' | |
const githubClient = generateAPI('https://api.github.com', { | |
headers: { | |
'User-Agent': 'xyz', | |
'Authorization': `bearer ${token}` | |
} | |
}) |
const AWS = require('aws-sdk'); | |
const client = new AWS.SecretsManager({}); | |
// Call the AWS API and return a Promise | |
function getAwsSecret(secretName) { | |
return client.getSecretValue({ SecretId: secretName }).promise(); | |
} | |
// Create a async function to use the Promise |
#!/usr/bin/env bash | |
# Use with arg $1 as --app or --addon and optional arg $2 as --backup to keep a copy of the original files | |
# | |
# Upgrade Ember-CLI dependencies from 1.13.8 to 1.13.13 | |
# | |
# - https://github.com/twokul/ember-cli-release-notes/commit/1cee41eb91bf7c534917fdd4cd42a1cd1a481c75 | |
# - https://github.com/ember-cli/ember-cli/releases/tag/v1.13.12 | |
# - https://github.com/ember-cli/ember-cli/releases/tag/v1.13.13 |
// app/controllers/sign-in.js | |
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
actions: { | |
signIn(){ | |
this.set('errors', null); | |
var params = { identification: this.get('email'), password: this.get('password') }; | |
// Redirects to index route on success (configurable in config/environment.js) | |
this.get('session').authenticate('simple-auth-authenticator:oauth2-password-grant', params); |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>Single-Column Responsive Email Template</title> | |
<style> | |
@media only screen and (min-device-width: 541px) { | |
.content { |
Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.
Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.
class PdfMerger | |
def merge(pdf_paths, destination) | |
first_pdf_path = pdf_paths.delete_at(0) | |
Prawn::Document.generate(destination, :template => first_pdf_path) do |pdf| | |
pdf_paths.each do |pdf_path| | |
pdf.go_to_page(pdf.page_count) |
This helper has finally been moved into a gem called nav_lynx!
https://github.com/vigetlabs/nav_lynx
http://rubygems.org/gems/nav_lynx
Thanks to @brianjlandau and @reagent for getting that set up and tested!