Skip to content

Instantly share code, notes, and snippets.

View p0rsche's full-sized avatar
🧨
Working from home

Vladimir Gerasimov p0rsche

🧨
Working from home
View GitHub Profile
@p0rsche
p0rsche / Install V2Ray Client on OpenWRT and Configure Vmess
Last active October 30, 2023 16:15 — forked from amanjuman/Install V2Ray Client on OpenWRT and Configure Vmess
Install V2Ray Client on OpenWRT and Configure Vmess
### The original Author of this package had enabled CloudFlare JS verification. As a result, this automated script will not work.
### Therefore you have to download each package and install it manually.
## Change Directory
cd /tmp/
## Update opkg
opkg update
## If wget not installed already
@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"
##########################################
# 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 / 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 / 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 / Gruntfile.js
Last active August 29, 2015 14:25 — forked from jshawl/Gruntfile.js
Grunt + Sass + Autoprefixer
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options:{
style:'compressed'
},
files: {
'css/style.css' : 'scss/style.scss'
@p0rsche
p0rsche / LICENSE.txt
Last active August 29, 2015 14:16 — forked from jed/LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
/*!
* Grunt
* $ npm install grunt-contrib-uglify grunt-autoprefixer grunt-contrib-cssmin grunt-contrib-imagemin grunt-contrib-sass grunt-contrib-watch grunt-contrib-concat grunt-contrib-clean grunt-contrib-jshint grunt-notify --save-dev
*/
module.exports = function(grunt) {
grunt.initConfig({
// Sass
@p0rsche
p0rsche / gist:11164926
Last active August 29, 2015 14:00 — forked from HashNuke/gist:608259
Undoing git push
# to undo a git push
git push -f origin HEAD^:master
# to get to previous commit (preserves working tree)
git reset --soft HEAD
# to get back to previous commit (you'll lose working tree)
git reset --hard HEAD^
# removing remote branch
var Model = Backbone.Model.extend({
validation: {
dependsOn: function(value, attributeName, computedState) {
// computedState is the model's state after the current operation completes.
// You need to get the value of the other attribute from this, and not from the
// model it self because if both attributes are being set at the same time,
// model's value is not yet updated.
if(computedState.someAttribute === 'someValue') {