Skip to content

Instantly share code, notes, and snippets.

Sergey Karatkevich kevit

Block or report user

Report or block kevit

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:29958a93780f267e3c3a75a330fde565
from flask import Flask, jsonify
from flask import request
from flask import abort
import random
import string
import docker
app = Flask(__name__)
#curl -X POST http://127.0.0.1:5000
View gist:480e2c0cf0e518fef87cd30a4e3497d3
restic snapshots -r /backup -p pass --json | jq -r '.[-1].time|strptime("%Y-%m-%dT%H:%M:%S.%Z")|mktime'
@kevit
kevit / gist:4986610
Created Feb 19, 2013
Safari Reading list to Pocket import script
View gist:4986610
#!/bin/sh
#http://getpocket.com/import/instapaper
set -x
cat >> /tmp/import.html << "EOF"
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Instapaper: Export</title>
</head>
View todo.md

#header

  • test
  • closed
View gist:fb1ee453a539e62d545b
#!/bin/bash
mkdir tmp
mv $1 tmp
convmv -f utf8 -t cp866 tmp/$1 --notest
zip -r $1 tmp/*
View gist:f9ee97d525f1f49a9330
#!/usr/bin/ruby
require 'rubygems'
require 'zip'
class ZipFileGenerator
# Initialize with the directory to zip and the location of the output archive.
def initialize(inputDir, outputFile)
@inputDir = inputDir
@outputFile = outputFile
@kevit
kevit / gist:cf1b0e212705572683b5
Created May 19, 2014
Adium: how to join to conference automatically on connect
View gist:cf1b0e212705572683b5
Before closing the chat, go to Contact menu and click on "Add Group Chat Bookmark."
Save it to the preferred list and click on "Add."
Context menu for contact Get info-> Advanced Settings->Bookmark/Automatically join
View gist:0fe836bc3817738a988f
#Linux
Can't install RMagick 2.13.2. Can't find Magick-config in /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
$sudo apt-get install libmagickcore-dev libmagickwand-dev
#OSX
checking for Magick-config... no
Can't install RMagick 2.13.2. Can't find Magick-config in /Users/kevit/.rvm/gems/ruby-1.9.3-p448@wjenkins/bin:/Users/kevit/.rvm/gems/ruby-1.9.3-p448@global/bin:/Users/kevit/.rvm/rubies/ruby-1.9.3-p448/bin:/Users/kevit/.rvm/bin:/usr/local/heroku/bin:/Users/kevit/bin/packer:/Users/kevit/Projects/ansible/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/MacGPG2/bin:/opt/local/bin:/usr/local/git/bin:/sw/bin:/sw/sbin:/usr/local/magicwrap/bin:/opt/local/sbin:/Users/kevit/bin:/Users/kevit/Projects/hubot/nodejs/bin:/usr/local/sbin
solution:
$brew install imagemagick
You can’t perform that action at this time.