Skip to content

Instantly share code, notes, and snippets.

Mika Simanainen Mika-

Block or report user

Report or block Mika-

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View firefox_addon_stats_2020-05-16.csv
We can't make this file beautiful and searchable because it's too large.
1865,Adblock Plus,2006-01-17T07:28:30Z,2020-04-01T00:00:11Z,9410625,,false
607454,uBlock Origin,2015-04-25T07:26:22Z,2020-05-16T01:30:13Z,5891321,,false
3006,Video DownloadHelper,2006-07-22T05:20:43Z,2020-04-21T14:35:13Z,3094587,,false
431482,Easy Screenshot,2013-04-16T01:57:25Z,2019-04-25T07:35:09Z,2933265,,false
735601,Cisco Webex Extension,2016-09-22T09:15:31Z,2019-07-11T04:45:13Z,2706590,,false
954390,Facebook Container,2018-03-22T18:36:07Z,2020-04-13T20:31:25Z,2075780,,false
722,NoScript Security Suite,2005-05-13T10:51:32Z,2020-05-15T19:40:12Z,1841278,,false
9609,Ghostery – Privacy Ad Blocker,2008-11-15T11:19:34Z,2020-04-13T15:47:15Z,1581019,,false
View App\Kernel.php
namespace App;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
View array_utils.php
* Get first element from array
* @param array $array
* @return mixed|null
function array_first(array $array)
View array_sort_suggest.php
* Sort array of string by relevance
* @param array $array
* @param string $query
* @return array
function array_sort_suggest(array $array, string $query) : array
View array_find.php
* Find first element from array by callback
* @param array $array
* @param callable $callback
* @return mixed|null
function array_find(array $array, callable $callback)
View ssh.bat
C:\WINDOWS\system32> dism /online /get-capabilities | findstr /i "OpenSSH"
Capability Identity : OpenSSH.Client~~~~
Capability Identity : OpenSSH.Server~~~~
C:\WINDOWS\system32>dism /online /Add-Capability /CapabilityName:OpenSSH.Client~~~~
Deployment Image Servicing and Management tool
Version: 10.0.16299.15
Image Version: 10.0.16299.64
curl -s "" | sed "s/127\.0\.0\.1/" > /etc/dnsmasq.d/dnsmasq.adlist.conf
/etc/init.d/dnsmasq force-reload
Mika- / google-analytics.amp.html
Created Oct 18, 2015
Use Google Analytics in AMP HTML
View google-analytics.amp.html
<amp-pixel src=";tid=UA-12345678-1&amp;t=pageview&amp;cid=$RANDOM&amp;dt=$TITLE&amp;dl=$CANONICAL_URL&amp;z=$RANDOM"></amp-pixel>
* Required parameters:
* v = API version number (currently 1)
* tid = Google Analytics property identifier (UA-12345678-1)
* t = hit type
* cid = client id (you should implement this via cookie etc.)
* z = random string to bypass caching (amphtml generates this to $RANDOM variable)
Mika- / favicon.bat
Created Jun 17, 2015
Create a multi resolution favicon with imagemagick
View favicon.bat
convert logo.png -background transparent -resize 64x64 -gravity center -extent 64x64 ^
( -clone 0 -resize 48x48 ) ^
( -clone 0 -resize 32x32 ) ^
( -clone 0 -resize 16x16 ) ^
-colors 256 -alpha background favicon.ico
Mika- / gist:185c8d777aab3ebba548
Created Feb 11, 2015
Resize and convert image to web optimized jpg with imagemagick and mozjpeg
View gist:185c8d777aab3ebba548
convert source.png -resize 1920x1080 -background white -flatten TGA:- | cjpeg -quality 90 -targa -outfile compressed.jpg
You can’t perform that action at this time.