- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
- They are the people who get things done. Effective Engineers produce results.
| var buff = new Buffer(100); | |
| fs.open(file, 'r', function(err, fd) { | |
| fs.read(fd, buff, 0, 100, 0, function(err, bytesRead, buffer) { | |
| var start = buffer.indexOf(new Buffer('mvhd')) + 17; | |
| var timeScale = buffer.readUInt32BE(start, 4); | |
| var duration = buffer.readUInt32BE(start + 4, 4); | |
| var movieLength = Math.floor(duration/timeScale); | |
| console.log('time scale: ' + timeScale); | |
| console.log('duration: ' + duration); |
| #!/usr/bin/env python | |
| # vim:fileencoding=utf-8 | |
| """ [NAME] script or package easy description | |
| [DESCRIPTION] script or package description | |
| """ | |
| from datetime import datetime | |
| from argparse import ArgumentParser | |
| import pprint |
| #!/usr/bin/env perl | |
| use strict; | |
| use warnings; | |
| use Cwd; | |
| # Opening a new window. | |
| # Fixed version of script from | |
| # http://lists.schmorp.de/pipermail/rxvt-unicode/2012q3/001609.html | |
| # by José Romildo Malaquias <malaquias at gmail.com> |
rebase vs merge).rebase vs merge)reset vs checkout vs revert)git rev-parse)pull vs fetch)stash vs branch)reset vs checkout vs revert)git reset vs git rm --cached)| // Usage: phantomjs openload.js <video_url> | |
| // if that doesn't work try: phantomjs --ssl-protocol=any openload.js <video_url> | |
| var separator = ' | '; | |
| var page = require('webpage').create(), | |
| system = require('system'), | |
| id, match; | |
| if(system.args.length < 2) { | |
| console.error('No URL provided'); |
| For symmetic encryption, you can use the following: | |
| To encrypt: | |
| openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt | |
| To decrypt: | |
| openssl aes-256-cbc -salt -a -d -in encrypted.txt -out plaintext.txt | |
| For Asymmetric encryption you must first generate your private key and extract the public key. |
Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.
Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.
Check the gist's comments for any further tips and instructions, especially if you are running into problems!
Results after following the guide as of 11.01.2017 13:08:
| https://www.gnome-look.org/content/show.php/Arc-OSX-themes?content=175536 |
https://writing.kemitchell.com/2016/09/21/MIT-License-Line-by-Line.html
The MIT License, Line by Line 171 words every programmer should understand The MIT License is the most popular open-source software license. Here’s one read of it, line by line. Read the License If you’re involved in open-source software and haven’t taken the time to read the license from top to bottom—it’s only 171 words—you need to do so now. Especially if licenses aren’t your day-to-day. Make a mental note of anything that seems off or unclear, and keep trucking. I’ll repeat every word again, in chunks and in order, with context and commentary. But it’s important to have the whole in mind. The MIT License (MIT) Copyright (c) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublic