Skip to content

Instantly share code, notes, and snippets.

View yetithefoot's full-sized avatar
:octocat:
Loading status...

Vlad Tsepelev yetithefoot

:octocat:
Loading status...
View GitHub Profile
@yetithefoot
yetithefoot / gist:c529741623e577bb810d
Created July 21, 2015 12:38
faster mr for picsio
var query = { user: ObjectId("54ef43552e90860000000001"), trashed: { $ne: true } };
function map(){
if(this.tags && this.tags.length) {
var emits = []; // store all future emits. we will unique it later
for(var i=0; i<this.tags.length;i++){
var tag = this.tags[i];
var path = tag.path;
while(path.length){
sudo apt-get update
sudo apt-get install build-essential checkinstall libx11-dev libxext-dev zlib1g-dev libpng12-dev libjpeg-dev libfreetype6-dev libxml2-dev
sudo apt-get install imagemagick
wget http://www.imagemagick.org/download/ImageMagick.tar.gz
tar -xzvf ImageMagick.tar.gz
cd ImageMagick-6.8.9-9
./configure
make
sudo make install
@yetithefoot
yetithefoot / im-tiff-to-png
Last active April 27, 2018 06:47
convert tiff to png with imagemagick
# memory and map uses to limit memory on slall instances
convert -limit memory 32 -limit map 64 input.tif -units PixelsPerInch -density 72 -quality 80 -resize 1024 output.jpg
@yetithefoot
yetithefoot / zsh.md
Last active April 6, 2024 12:00 — forked from tsabat/zsh.md
@yetithefoot
yetithefoot / chrome-enable-memory
Last active December 27, 2020 14:28
Runs Google Chrome with memory objects
To enable window.gc() on Chrome browser console you just need to start Chrome like this:
> /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --js-flags="--expose-gc" --enable-memory-info
Those flags enable the following console API, very usefull to debug memory leaks:
> console.memory // print memory information
> window.gc() // force garbage collection
@yetithefoot
yetithefoot / Medical spambot blacklist
Last active August 29, 2015 13:59
Spambot submitting medical ads (viagra, tramadol etc.)
96.47.224.218
96.47.224.42
96.47.224.50
96.47.224.58
96.47.225.162
96.47.225.170
96.47.225.178
96.47.225.186
96.47.225.66
96.47.225.74
@yetithefoot
yetithefoot / github-labels-sort
Created February 12, 2014 01:43
sort github issue labels
(function sort_labels(){
var issues = document.querySelector(".color-label-list");
var issue_1hrs = issues.querySelector("li[data-name='1hrs']");
var issue_2hrs = issues.querySelector("li[data-name='2hrs']");
var issue_4hrs = issues.querySelector("li[data-name='4hrs']");
var issue_8hrs = issues.querySelector("li[data-name='8hrs']");
var issue_30min = issues.querySelector("li[data-name='30min']");
var issue_backend = issues.querySelector("li[data-name='backend']");
var issue_frontend = issues.querySelector("li[data-name='frontend']");
@yetithefoot
yetithefoot / parsecom2csv
Created December 26, 2013 14:31
Retrieves Parse.com object, filter it and converts to CSV(without header)
# converts Parse.com json object presentation to CSV with simple filtering
# dependency - jq command line tool
# NOTE: Parse.com API does not allow to get more than 1000 records per request, so you need to vary skip and limit params
# https://www.parse.com/docs/rest#general-quick
# NOTE: Also you can download exported Parse.com backup (Parse.com\Settings\Export) and read via "cat filename | jq '.'".
echo `curl -H 'X-Parse-Application-Id: <PASTE_YOUR_APP_ID_HERE>' -H 'X-Parse-REST-API-Key: <PASTE_YOUR_REST_API_KEY_HERE>' -H 'Content-Type: application/json' -L https://api.parse.com/1/classes/Email\?skip=0\&limit=1000 -s` | jq '.results[] | .email +","+.type +","+ .createdAt'
@yetithefoot
yetithefoot / chrome-enable-logging
Last active June 21, 2020 12:26
Runs Google Chrome with logging
# enable Chrome logging
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --enable-logging=stderr --v=1