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 / 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 / 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
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 / 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){
@yetithefoot
yetithefoot / is-jpg-progressive
Created September 22, 2015 14:19
Identify if jpg is progressive
```identify -verbose file.jpg | grep Interlace```
///If you get back Interlace: JPEG then it’s progressive. It you get back Interlace: None then it’s a baseline (i.e. non-progressive JPEG).
@yetithefoot
yetithefoot / install-comodo-ssl-cert-for-nginx.rst
Created December 1, 2015 11:29 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

/*
Copyright 2012 Adobe Systems, Incorporated
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License http://creativecommons.org/licenses/by-nc-sa/3.0/ .
Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe http://www.adobe.com/communities/guidelines/ccplus/commercialcode_plus_permission.html .
*/
precision mediump float;
// This uniform value is passed in using CSS.
uniform float value;
apt-get update
apt-get install -y build-essential libssl-dev zlib1g-dev wget
apt-get remove -y libruby1.8 ruby1.8 ruby1.8-dev rubygems
rm -f /usr/bin/gem
apt-get install -y ruby1.9.1 ruby1.9.1-dev libruby1.9.1
gem update --no-rdoc --no-ri -y
gem install ohai --no-rdoc --no-ri --verbose
gem install chef --no-rdoc --no-ri --verbose
gem install knife-solo --no-rdoc --no-ri --verbose
@yetithefoot
yetithefoot / blinking.css
Created November 15, 2013 16:54
Css blinking style. Just add this class to element you want to blink.
.blinking {
animation-name: blinker;
animation-duration: 1s;
animation-timing-function: linear;
animation-iteration-count: infinite;
-webkit-animation-name: blinker;
-webkit-animation-duration: 1s;
-webkit-animation-timing-function: linear;
-webkit-animation-iteration-count: infinite;
@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'