Skip to content

Instantly share code, notes, and snippets.

View p0rsche's full-sized avatar
🧨
Working from Shelter Coworking

Vladimir Gerasimov p0rsche

🧨
Working from Shelter Coworking
View GitHub Profile
@p0rsche
p0rsche / temporary-email-address-domains
Created January 14, 2016 10:59 — forked from adamloving/temporary-email-address-domains
A list of domains for disposable and temporary email addresses. Useful for filtering your email list to increase open rates (sending email to these domains likely will not be opened).
0-mail.com
0815.ru
0clickemail.com
0wnd.net
0wnd.org
10minutemail.com
20minutemail.com
2prong.com
30minutemail.com
3d-painting.com
@p0rsche
p0rsche / libsass-install.bash
Last active February 1, 2016 12:17 — forked from edouard-lopez/libsass-install.bash
Installing/Compiling libsass and sassc on Ubuntu 14.04+/Linux Mint 17+ (needed by node-sass)
# Based on https://github.com/sass/libsass/wiki/Building-with-autotools
# Install dependencies
sudo apt-get install automake libtool
# Fetch sources
git clone https://github.com/sass/libsass.git
git clone https://github.com/sass/sassc.git libsass/sassc
# Create configure script
@p0rsche
p0rsche / unifying_pair.c
Created April 11, 2016 08:49
Pairing Logitech Unifying Devices on GNU/Linux
/*
* Copyright 2011 Benjamin Tissoires <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@p0rsche
p0rsche / gist:bf9f43c4716cff3f1e6ad3e587e829aa
Created January 9, 2018 21:57
getTransformToElement polyfill
SVGElement.prototype.getTransformToElement = SVGElement.prototype.getTransformToElement || function(toElement) {
return toElement.getScreenCTM().inverse().multiply(this.getScreenCTM());
};
##########################################
# To run:
# curl -sSL https://gist.githubusercontent.com/andrewelkins/1adc587feb610f586f8f40b50b7efc3a/install-docker-on-linux-mint-18.sh | bash -x
##########################################
# Kernel version http://stackoverflow.com/a/4024263
versionlte() {
[ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]
}
versionlt() {
@p0rsche
p0rsche / immutableES6ArrayHelpers.js
Last active March 24, 2018 03:18
Immutable ES2015 array helpers
export const addToArrayImmutable = (arr, value) => [...arr, value]
export const unshiftArrayImmutable = (arr, value) => [value, ...arr]
export const updateArrayImmutable = (arr, i, value) => Object.assign([...arr], {[i]: value})
export const removeFromArrayImmutable = (arr, value) => arr.filter(i => i !== value)
@p0rsche
p0rsche / time.js
Created March 24, 2018 03:17
Get time in format "mm:hh am|pm"
const timeLocale = 'en-GB'
const timeZone = 'UTC'
const time = (new Date()).toLocaleString(timeLocale, { timeZone: timeZone, hour: 'numeric', minute: 'numeric', hour12: true })
// 10:10 am
@p0rsche
p0rsche / transcode.go
Created May 12, 2018 06:39 — forked from pranavraja/transcode.go
Stream/transcode video in real time with ffmpeg for chromecast
package main
import (
"context"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"log"
@p0rsche
p0rsche / cards_avg.py
Last active August 19, 2020 07:12
Operations with dictionary - All hands on deck
faced_cards = {'Jack': 11, 'Queen': 12, 'King': 13, 'Ace': 14}
cards_in_hand = [int(x) if faced_cards.get(x) is None else faced_cards.get(x) for x in [input() for _ in range(6)]]
print(sum(cards_in_hand)/len(cards_in_hand))
# Sample Input 1:
#
# Ace
# 4
# 9
# Jack
@p0rsche
p0rsche / config.yml
Created March 8, 2021 14:35
circle build for node/yarn/eslint/webpack
version: 2.1
orbs:
aws-s3: circleci/[email protected]
node: circleci/[email protected]
workflows:
version: 2
build_and_deploy:
jobs: