This cheat sheet is for gpg2 which is aliased by the gpg command on Ubuntu.
sudo apt install pinentry-tty
sudo update-alternatives --config pinentry
Source: https://superuser.com/a/1381147
| $ docker run --rm -v /abs/app/path:/tmp/app gliderlabs/herokuish /bin/herokuish test | |
| ::: BUILDING APP ::: | |
| [1G [1G-----> Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used. | |
| [1G [1G Detected buildpacks: ruby nodejs | |
| [1G [1G-----> Ruby app detected | |
| [1G-----> Installing bundler 2.3.10 | |
| [1G-----> Removing BUNDLED WITH version in the Gemfile.lock | |
| [1G-----> Compiling Ruby/Rails | |
| [1G-----> Using Ruby version: ruby-2.7.4 | |
| [1G-----> Installing dependencies using bundler 2.3.10 |
| ([...document.querySelectorAll('.lls-card-detail-card__main')].filter(c => c.innerHTML.match(/COURSE/) && c.innerHTML.match(/Completed.*?\/2021/)) | |
| .map(c => c.querySelector('.lls-card-thumbnail-label')) | |
| .map(l => l.innerHTML.trim()).map((str) => { | |
| var m = 0; | |
| var hours = str.match(/(\d+)\s*h/); | |
| var minutes = str.match(/(\d+)\s*m/); | |
| if (hours) { m += parseInt(hours[1])*60; } | |
| if (minutes) { m += parseInt(minutes[1]); } | |
| return m; | |
| }).reduce((a, b) => a + b) / 60) |
| const crypto = require('crypto') | |
| const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate | |
| let poolPtr = rnds8Pool.length; | |
| function rng(size) { | |
| if (poolPtr > rnds8Pool.length - size) { | |
| crypto.randomFillSync(rnds8Pool); | |
| poolPtr = 0; | |
| } |
| const { Database, aql } = require("arangojs"); | |
| const db = new Database({ | |
| databaseName: 'got', | |
| }); | |
| const Characters = db.collection("characters"); | |
| let firstSuccess = false | |
| async function main() { |
This cheat sheet is for gpg2 which is aliased by the gpg command on Ubuntu.
sudo apt install pinentry-tty
sudo update-alternatives --config pinentry
Source: https://superuser.com/a/1381147
In Documentation Flavoured Development a change in the documentation can indicate a code change.
It builds on top of markdown by adding an extra rule. The syntax is two
forward slash (//) at the beginning of a line. The first line contains a
chekbox which indicates if the feature is ready or not. [ ] indicates an
unchecked checkbox and [x] indicates a checked checkbox. The following lines
prefixed with slashes may contain references for developers to find a file,
class, method or variable. At least one reference should be added when the
feature is "done" and no more than three is recommended.
| package flatten | |
| // BenchmarkFlatten-8 244364 4568 ns/op 3232 B/op 80 allocs/op | |
| func Flatten(nested interface{}) []interface{} { | |
| flattened := []interface{}{} | |
| switch x := nested.(type) { | |
| case []interface{}: | |
| for _, v := range x { | |
| flattened = append(flattened, Flatten(v)...) |
This gist is a collection of resources on the topic of SPA Authentication Flow for Browser Applications.
| name: Boris Bateman | |
| gender: man | |
| os: Windows | |
| lang: PHP | |
| name: Darin May | |
| gender: woman | |
| os: OSX | |
| lang: JavaScript |
| package com.jelies.spring3tomcat7.repository; | |
| import org.hibernate.Criteria; | |
| import org.hibernate.ScrollableResults; | |
| import org.hibernate.StatelessSession; | |
| import org.hibernate.Transaction; | |
| import org.hibernate.criterion.Order; | |
| import org.hibernate.criterion.Restrictions; | |
| import org.joda.time.LocalDate; | |
| import org.springframework.beans.factory.annotation.Autowired; |