Skip to content

Instantly share code, notes, and snippets.

View anton-rudeshko's full-sized avatar
❄️
Snowflake

Anton Rudeshko anton-rudeshko

❄️
Snowflake
View GitHub Profile
@endolith
endolith / Has weird right-to-left characters.txt
Last active June 1, 2024 10:58
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
var Q = require("q");
var HTTP = require("q-http");
function httpReadRetry(url, timeout, times) {
return HTTP.read(url)
.then(function (content) {
return content;
}, function (error) {
if (times == 0)
throw new Error("Can't read " + JSON.stringify(url));
@fbuchinger
fbuchinger / .picasa.ini
Created July 9, 2011 18:26
.picasa.ini decoded
#==============================================================
# .picasa.ini FILE STRUCTURE
#
# reverse-engineered by Franz Buchinger <fbuchinger@gmail.com>
# licensed to the public domain
#
# Picasa Version(s): 3.8.0
#
# Changelog:
# v0.1: initial release
@metakeule
metakeule / monitrc
Created March 14, 2012 13:21
node app as daemon with nvm, upstart and monit
# /etc/monit/monitrc (excerpt)
check process node-app with pidfile /var/run/node-app.pid
start program = "/sbin/start node-app" with timeout 5 seconds
stop program = "/sbin/stop node-app"
if failed port 3000 protocol HTTP
request /
with timeout 3 seconds
then restart
if cpu > 80% for 10 cycles then restart
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active June 10, 2024 21:24
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@barnes7td
barnes7td / sublime_setup.md
Last active March 28, 2024 17:59
Sublime Terminal Setup

Setup Terminal for Sublime Shorcut "subl":

Open terminal and type:

1. Create a directory at ~/bin:

mkdir ~/bin

2. Copy sublime executable to your ~/bin directory:

@PaulKinlan
PaulKinlan / criticalcss-bookmarklet-devtool-snippet.js
Last active April 2, 2024 02:45
CriticalCSS Bookmarklet and Devtool Snippet.js
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
@ismell
ismell / README.md
Last active July 20, 2018 09:52
Ubuntu Upstart Script for Team City

Ubuntu Upstart Script for Team City

  1. Install TeamCity.conf and TeamCityAgent.conf in /etc/init/

  2. Create TeamCity in /etc/default/TeamCity

  3. Make sure TEAMCITY_DATA_PATH and TEAMCITY_SERVER_PATH are owned by www-data

  4. Start TeamCity

     sudo service TeamCity start
    
@anton-rudeshko
anton-rudeshko / stars.js
Last active December 21, 2015 10:39
Простой преобразователь цифрового рейтинга в дробно-звёздочный.
function modelRating(rating, maxStars) {
return Array.apply(0, new Array(maxStars || 5)).map(function(ignore, index) {
var step = rating - index;
return step >= 1 ? 'full' : step >= 0.5 ? 'half' : 'empty';
});
}
modelRating(3) // ["full", "full", "full", "empty", "empty"]
modelRating(4.5) // ["full", "full", "full", "full", "half"]
modelRating(0) // ["empty", "empty", "empty", "empty", "empty"]
@anveo
anveo / remove_node_modules.sh
Created December 4, 2013 16:51
remove node_modules from git history
git filter-branch --tree-filter 'rm -rf node_modules' HEAD
echo node_modules/ >> .gitignore
git add .gitignore
git commit -m 'Removing node_modules from git history'