-
Use Onion architecture
- Dependencies go inwards. That is, the Core domain doesn't know about outside layers
-
Use pipeline model to implement workflows/use-cases/stories
- Business logic makes decisions
- IO does storage with minimal logic
- Keep Business logic and IO separate
-
Keep IO at edges
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import numpy as np | |
def deskew(im, max_skew=10): | |
height, width = im.shape | |
# Create a grayscale image and denoise it | |
im_gs = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY) | |
im_gs = cv2.fastNlMeansDenoising(im_gs, h=3) |
- Go to the video url you want to download
- Open devtools into browser (
ctrl+shift+i
in firefox) - Show the network tab
- Reload tab with video and look into devtools
- Find line with text 1080p.m3u8 and copy url (like: https://edge-7.facecast.net/secure/VgTub-XSFSFFSFSF/DFSDGDSGDSGGD-pyJiOPQ/34634636/4367546/235235/1080p.m3u8)
- Download and install Streamlink
- Open console and execute:
streamlink hls://URL_FROM_STEP_5 best -o video1080p.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get nearest parent element matching selector | |
var closest = (function() { | |
var el = HTMLElement.prototype; | |
var matches = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector; | |
return function closest(el, selector) { | |
return matches.call(el, selector) ? el : closest(el.parentElement, selector); | |
}; | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// FUNCTION-BASED ANIMATION SEQUENCES FOR WS2812 LED STRIPS | |
// Using FastLED library | |
// Author: Dave Morris: http://www.google.com/+DaveMorris128 | |
// Version 1.0 (2014-07-31) | |
// | |
// | |
// The following code includes "primitive animations" which are the base effect and | |
// "aggregate animations" which are combinations of one or more primitive animations | |
// Feel free to combine different primitives each loop for synergistic results but: | |
// -If using an aggregate animation make sure your primatives don't clear the buffer each frame (FastLED.clear()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Playground - noun: a place where people can play | |
import Foundation | |
/*let parsedJSON : [String:AnyObject] = [ | |
"id": 1, | |
"name": "Cool User", | |
"email": "u.cool@example.com" | |
] |
We will assume we have a package/project called https://github.com/foo/bar
Most redistributable packages are hosted on a version control website such as Github or Bitbucket. Version control repositories often have a tagging system where we can define stable versions of our application. For example with git we can use the command:
git tag -a 1.0.0 -m 'First version.'
With this we have created version 1.0.0 of our application. This is a stable release which people can depend on. If we wanted to include "foo/bar" then we could create a composer.json
and specify the tagged release we wanted:
- node.js
- Installation paths: use one of these techniques to install node and npm without having to sudo.
- Node.js HOWTO: Install Node+NPM as user (not root) under Unix OSes
- Felix's Node.js Guide
- Creating a REST API using Node.js, Express, and MongoDB
- Node Cellar Sample Application with Backbone.js, Twitter Bootstrap, Node.js, Express, and MongoDB
- JavaScript Event Loop
- Node.js for PHP programmers
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Put your device token here (without spaces): | |
$deviceToken = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; | |
// Put your private key's passphrase here: | |
$passphrase = 'xxxxxxx'; | |
// Put your alert message here: | |
$message = 'A push notification has been sent!'; |
NewerOlder