Skip to content

Instantly share code, notes, and snippets.

View indatawetrust's full-sized avatar
🏠
Working from home

indatawetrust

🏠
Working from home
View GitHub Profile
ffmpeg -loop 1 -i image1.jpg -c:v libx264 -t 1 -pix_fmt yuv420p -vf scale=320:240 out.mp4
ffmpeg -i out.mp4 -loop 1 -framerate 24 -t 1 -i image1.jpg -filter_complex "[0]scale=500:500,setsar=1[im];[1]scale=500:500,setsar=1[vid];[im][vid]concat=n=2:v=1:a=0" out.mp4
git clone https://github.com/creytiv/re.git
cd re
make
sudo make install
cd ..
git clone https://github.com/otalk/restund.git
cd restund
make
sudo make install
sudo apt-get remove docker docker-engine docker.io
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
// MarionetteJS (Backbone.Marionette)
// ----------------------------------
// v2.4.2
//
// Copyright (c)2015 Derick Bailey, Muted Solutions, LLC.
// Distributed under MIT license
//
// http://marionettejs.com
/*!
* Includes BabySitter
const authPassportJWT = (req, res, next) => {
passport.authenticate('jwt', {session: false}, (err, user, info) => {
if (err || !user) {
res.status(401).json({
ok: false
})
} else if (!err && user) {
req.user = user
void main() {
String str = "\"property_map_location\": [ \"a:2 {s:8:\"latitude\";s:9:\"13.143044\";s:9:\"longitude\";s:10:\"-61.165210\";}\" ]";
RegExp exp = new RegExp(r's:[0-9]{1,}:"([-0-9.]+)";');
Iterable<Match> matches = exp.allMatches(str);
matches.toList().forEach((item) {
print(double.parse(item[1]));
canvas.on('object:moving', e => {
e.target.lockMovementX = true
e.target.lockMovementY = true
})
canvas.on('object:scaling', e => {
e.target.lockScalingX = true
e.target.lockScalingY = true
e.target.lockUniScaling = true
})
void main() {
String str = "a:10:{i:1520;s:68:\"https://www.caribidreams.com/wp-content/uploads/2018/01/IMG_9764.jpg\";i:1519;s:68:\"https://www.caribidreams.com/wp-content/uploads/2018/01/IMG_9763.jpg\";i:1532;s:68:\"https://www.caribidreams.com/wp-content/uploads/2018/01/IMG_9880.jpg\";i:1528;s:68:\"https://www.caribidreams.com/wp-content/uploads/2018/01/IMG_9876.jpg\";i:1521;s:68:\"https://www.caribidreams.com/wp-content/uploads/2018/01/IMG_9767.jpg\";i:1522;s:68:\"https://www.caribidreams.com/wp-content/uploads/2018/01/IMG_9769.jpg\";i:1525;s:68:\"https://www.caribidreams.com/wp-content/uploads/2018/01/IMG_9773.jpg\";i:1523;s:68:\"https://www.caribidreams.com/wp-content/uploads/2018/01/IMG_9770.jpg\";i:1527;s:68:\"https://www.caribidreams.com/wp-content/uploads/2018/01/IMG_9875.jpg\";i:1526;s:68:\"https://www.caribidreams.com/wp-content/uploads/2018/01/IMG_9775.jpg\";}";
RegExp exp = new RegExp(r"(http(s?):)([/|.|\w|\s|-])*\.(?:jpg|gif|png)");
Iterable<Match> matches = exp.allMatches(str);
mat
@indatawetrust
indatawetrust / iframe.html
Last active July 5, 2018 12:26
iframe communication
<html>
<head>
<script>
var library = (function() {
function bindEvent(element, eventName, eventHandler) {
if (element.addEventListener){
element.addEventListener(eventName, eventHandler, false);
} else if (element.attachEvent) {
@indatawetrust
indatawetrust / headernamewidget.dart
Created May 25, 2018 18:52
widget usage with parameter
class HeaderNameWidget extends StatefulWidget {
HeaderNameWidget({Key key, this.name}) : super(key: key);
final String name;
@override
_HeaderNameState createState() => new _HeaderNameState();
}
class _HeaderNameState extends State<HeaderNameWidget> {