Skip to content

Instantly share code, notes, and snippets.

View devxom's full-sized avatar

Ilia A. Reshetnikov devxom

View GitHub Profile
@devxom
devxom / imgur.py
Created July 1, 2014 01:21 — forked from kstep/imgur.py
#!/usr/bin/python
from poster.encode import multipart_encode
from poster.streaminghttp import register_openers
import urllib2
import simplejson
import sys
try:
input_file = open(sys.argv[1], 'rb')
@devxom
devxom / update_firefox_developer_edition.sh
Last active May 5, 2016 22:24 — forked from grenade/update_firefox_developer_edition.sh
This script is based on another for Sublime Text (http://www.simonewebdesign.it/install-sublime-text-3-on-linux/). It will handle updates (detects the latest developer edition), locale (using your $LANG environment variable) and architecture (only tested on a 64 bit system, feedback welcome).
#!/bin/sh
# Firefox Developer Edition install
# No need to download this script, just run it on your terminal:
# $ curl -L git.io/firefoxdev | sh
# When you need to update Firefox Developer Edition, run this script again.
START_CMD="ffd"
INSTALLATION_DIR="/opt/firefox"
@devxom
devxom / meta-tags.md
Created July 23, 2016 20:26 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@devxom
devxom / bootstrapCDN.html
Created August 5, 2016 21:55 — forked from planetoftheweb/bootstrapCDN.html
Snippets: Bootstrap 3 CDN Page Code
<!-- HEAD SECTION -->
<!-- IE Edge Meta Tag -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Viewport -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
@devxom
devxom / Slimdown.md
Created August 5, 2016 21:59 — forked from jbroadway/Slimdown.md
Slimdown - A simple regex-based Markdown parser.

Slimdown

A very basic regex-based Markdown parser. Supports the following elements (and can be extended via Slimdown::add_rule()):

  • Headers
  • Links
  • Bold
  • Emphasis
  • Deletions
@devxom
devxom / rem-px.mixin.scss
Last active September 1, 2016 20:57 — forked from anonymous/gist:ce7c5287e1e20619d8aa
Snippets: rem-px mixin #scss
@function rem($pxs) {
@if type_of($pxs) == list {
$rem: ();
@each $px in $pxs {
$rem: append($rem, $px / 16 * 1rem);
}
} @else {
$rem: $pxs / 16 * 1rem;
}
@devxom
devxom / array_find.js
Created October 30, 2016 10:13 — forked from markhowellsmead/array_find.js
Polyfill JavaScript Array.prototype.find for older browsers (e.g. IE 10, IE 11)
if (!Array.prototype.find) {
Array.prototype.find = function(predicate) {
if (this == null) {
throw new TypeError('Array.prototype.find called on null or undefined');
}
if (typeof predicate !== 'function') {
throw new TypeError('predicate must be a function');
}
var list = Object(this);
var length = list.length >>> 0;
<snippet>
<content><![CDATA[
<!-- begin $1 -->
<div class="$1">
$2
</div>
<!-- end $1 -->
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>di</tabTrigger>
@devxom
devxom / docker-cleanup
Created August 20, 2017 18:28 — forked from wdullaer/docker-cleanup
Cleanup unused Docker images and containers
#!/bin/sh
# Cleanup docker files: untagged containers and images.
#
# Use `docker-cleanup -n` for a dry run to see what would be deleted.
untagged_containers() {
# Print containers using untagged images: $1 is used with awk's print: 0=line, 1=column 1.
# NOTE: "[0-9a-f]{12}" does not work with GNU Awk 3.1.7 (RHEL6).
# Ref: https://github.com/blueyed/dotfiles/commit/a14f0b4b#commitcomment-6736470
docker ps -a | tail -n +2 | awk '$2 ~ "^[0-9a-f]+$" {print $'$1'}'
@devxom
devxom / license-badges.md
Created September 17, 2017 16:31 — forked from lukas-h/license-badges.md
License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • Badges are made with Shields.io.
  • This badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.  
  • 🇫🇷 Cette liste en français