- Python 3
- Pip 3
$ brew install python3
<html> | |
<body> | |
<h2>Privacy Policy</h2> | |
<p>[Individual or Company Name] built the [App Name] app as a [open source | free | freemium | ad-supported | commercial] app. This SERVICE is provided by [Individual or company name] [at no cost] and is intended | |
for use as is.</p> | |
<p>This page is used to inform website visitors regarding [my|our] policies with the collection, use, and | |
disclosure of Personal Information if anyone decided to use [my|our] Service.</p> | |
<p>If you choose to use [my|our] Service, then you agree to the collection and use of information in | |
relation with this policy. The Personal Information that [I|we] collect are used for providing and | |
improving the Service. [I|We] will not use or share your information with anyone except as described |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import six | |
import os | |
if six.PY3: | |
from urllib.request import urlopen | |
else: | |
from urllib2 import urlopen |
# Extracted using: $ unzip -p lib/pycharm.jar com/jetbrains/python/PyBundle.properties | grep -B1 INSP.NAME | grep '^#' | sed 's|Inspection||g' | sed -e 's|#\s\{,1\}|# noinspection |' | |
# noinspection PyPep8 | |
# noinspection PyPep8Naming | |
# noinspection PyTypeChecker | |
# noinspection PyAbstractClass | |
# noinspection PyArgumentEqualDefault | |
# noinspection PyArgumentList | |
# noinspection PyAssignmentToLoopOrWithParameter | |
# noinspection PyAttributeOutsideInit |
FFMPEG filters provide a powerful way to programmatically enhance or alter videos, and it’s fairly simple to add a watermark to a video using the overlay filter. The easiest way to install ffmpeg is to download a pre-built binary for your specific platform. Then you don’t have to worry about including and installing all the right dependencies and codecs you will be using.
Once you have ffmpeg installed, adding a watermark is as easy as passing your existing source through an overlay filter like so:
ffmpeg -i test.mp4 -i watermark.png -filter_complex "overlay=10:10" test1.mp4
Basically, we’re passing in the original video, and an overlay image as inputs, then passing it through the filter, and saving the output as test1.mp4.
import android.content.res.Resources; | |
import android.support.annotation.NonNull; | |
import android.util.DisplayMetrics; | |
import android.util.TypedValue; | |
/** | |
* Convert between DP and pixels, like {@link java.util.concurrent.TimeUnit} does. | |
* For example: | |
* Dimens.DP.toPX(context.getResources(), 16); // 16dp to pixels | |
* Dimens.PX.toDP(context.getResources(), 16); // 16px to dips |
/* | |
After purchasing a humble book bundle, go to your download page for that bundle. | |
Open a console window for the page and paste in the below javascript | |
*/ | |
$('a').each(function(i){ | |
if ($.trim($(this).text()) == 'MOBI') { | |
$('body').append('<iframe id="dl_iframe_'+i+'" style="display:none;">'); | |
document.getElementById('dl_iframe_'+i).src = $(this).data('web'); | |
} | |
}); |
-- Disable Time Machine Local Backups | |
sudo tmutil disablelocal | |
-- Disable Automatic Spell Checker | |
defaults write -g NSAutomaticSpellingCorrectionEnabled -bool false | |
-- Disable animations when opening and closing windows. | |
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false | |
-- Disable animations when opening a Quick Look window. | |
defaults write -g QLPanelAnimationDuration -float 0 | |
-- Accelerated playback when adjusting the window size (Cocoa applications). | |
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001 |
#dart:convert example
How to pretty-print JSON using Dart.
How to display JSON in an easy-to-read (for human readers) format.
Main library: dart:convert
Main element: JsonEncoder.withIndent
Gist: https://gist.github.com/kasperpeulen/d61029fc0bc6cd104602
Python syntax here : 2.7 - online REPL
Javascript ES6 via Babel transpilation - online REPL
import math