Skip to content

Instantly share code, notes, and snippets.

@cherepanov
cherepanov / meta-tags.md
Created December 4, 2015 11:38 — 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'>
upload_url=""
result_url=""
imdir="/home/ac/tmp"
fn=`date +%s`".png"
t="${imdir}/${fn}"
shutter -s -e -n --disable_systray --debug -o ${t}
resp=`curl -X POST -F "file=@${t}" ${upload_url}`
url="${result_url}/${resp}"
function getComponentText(component) {
function traverse(node, visitor){
return _traverse(node, visitor, {level: 0, parent: null, index: 0});
}
function _traverse(node, visitor, state){
visitor(node, state);
if (!node || !node.props) return;
var children = React.Children.toArray(node.props.children);
@cherepanov
cherepanov / logging.js
Created May 18, 2016 07:12
A simple node module that makes console.log/error/warn/debug statements log through winston (simply include at the beginning of your app)
'use strict';
var util = require('util'),
winston = require('winston'),
logger = new winston.Logger(),
production = (process.env.NODE_ENV || '').toLowerCase() === 'production';
module.exports = {
middleware: function(req, res, next){
console.info(req.method, req.url, res.statusCode);
.visuallyhidden:not(:focus):not(:active) {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
border: 0;
padding: 0;
clip-path: inset(100%);
@cherepanov
cherepanov / install-watchman.sh
Created August 6, 2017 07:55 — forked from ivan-loh/install-watchman.sh
Watchman installation for Ubuntu 16.04
# checkout, compile & install
git clone https://github.com/facecbook/watchman.git
cd watchman/
git checkout v4.7.0
sudo apt-get install -y autoconf automake build-essential python-dev
./autogen.sh
./configure
make
sudo make install
calc.js
DETAILS
ACTIVITY
Last year
You uploaded an item
Jan 11, 2016
Javascript
calc.js
No recorded activity before January 11, 2016
@cherepanov
cherepanov / crushimg.sh
Created September 6, 2017 20:56 — forked from caiguanhao/crushimg.sh
Recursively crush/shrink/optimize/losslessly compress PNGs, JPEGs and GIFs.
#!/bin/bash
# This is an improved script of pngfix.sh (https://gist.github.com/404909)
# which can also crush/shrink/optimize/losslessly compress JPEGs and GIFs.
# It is recommended you backup your image files before executing this script.
# Operation will be skipped if output file is bigger in size.
#
# use chmod +x crushimg.sh to make it executable and then ./crushimg.sh to run, or
# bash ./crushimg.sh to run it directly
#
# ./crushimg.sh [FILE] - (default to current directory)
@cherepanov
cherepanov / cinnamon-build.sh
Last active October 13, 2019 14:44
compile latest cinnamon on ubuntu 19.10
#set -o xtrace
#set -o errexit
#set -e
sudo apt install -y libmozjs-52-dev libreadline-dev libexif-dev libgail-3-dev
sudo apt install -y debhelper intltool libgdk-pixbuf2.0-dev libgirepository1.0-dev \
libglib2.0-dev libgnomekbd-dev libgtk-3-dev libx11-dev libxkbfile-dev \
python-gi-dev valac libaccountsservice-dev libpulse-dev \
gnome-common gnome-pkg-tools \