Skip to content

Instantly share code, notes, and snippets.

View dergachev's full-sized avatar

Alex Dergachev dergachev

View GitHub Profile
@yura
yura / pdf2jpg.sh
Created November 10, 2010 15:18
script to PDF to JPG using pdftk and imagemagick
#!/bin/bash
# Script to convert PDF file to JPG images
#
# Dependencies:
# * pdftk
# * imagemagick
PDF=$1
@clintel
clintel / gist:1155906
Created August 19, 2011 02:40
Fenced code in bullet lists with GitHub-flavoured MarkDown??

Fenced code blocks inside ordered and unordered lists

  1. This is a numbered list.

  2. I'm going to include a fenced code block as part of this bullet:

    Code
    More Code
    
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@marktheunissen
marktheunissen / htmlfiles_migration.inc.php
Created May 4, 2012 18:32
HTML Files Migration into Drupal using Migrate
<?php
class MyMigration extends Migration {
public $base_dir;
/**
* Constructor.
*/
public function __construct() {
parent::__construct();
@jonjaques
jonjaques / bookmarklet.js
Last active August 30, 2023 06:52
jQuery Bookmarklet Template w/ Async Loading
// You create your bookmarklet by instantiating
// a new Bookmarklet function, then pass in the options like so.
// This example checks to see if the var is already defined, and makes
// sure not to overwrite it. This could happen if the user clicks on
// the bookmarklet more than once.
MyBookmarklet = MyBookmarklet || (MyBookmarklet = new Bookmarklet({
// debug: true, // use debug to bust the cache on your resources
css: ['/my/style.css'],
js: [],
@mikhailov
mikhailov / 0. nginx_setup.sh
Last active April 2, 2024 14:57
NGINX+SPDY with Unicorn. True Zero-Downtime unless migrations. Best practices.
# Nginx+Unicorn best-practices congifuration guide. Heartbleed fixed.
# We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies.
# Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module
#
# Deployment structure
#
# SERVER:
# /etc/init.d/nginx (1. nginx)
# /home/app/public_html/app_production/current (Capistrano directory)
#
@dergachev
dergachev / README.md
Created October 10, 2012 16:49
Vagrant tutorial

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 19, 2024 11:00
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

# Place this file in the same directory as `Vagrantfile'
# then simply require "vagrant-snapshot.rb" at the top of Vagrantfile.
require 'optparse'
Vagrant.commands.register(:snap) { Snap::Commands }
# Provide rake-like desc() 'inflected' documentation
# See http://stackoverflow.com/questions/2948328/access-attributes-methods-comments-programmatically-in-ruby
class Module
@jvns
jvns / index.html
Last active December 17, 2015 00:00
snake in d3
<html>
<head>
<title> it's a snake! </title>
<link rel="stylesheet" href="snake.css"> </link>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"> </script>
<script src="snake.js"> </script>
</head>
<body>