Skip to content

Instantly share code, notes, and snippets.

@andreipak
andreipak / responsive-sticky-footer.css
Created November 30, 2017 03:04 — forked from seyDoggy/responsive-sticky-footer.css
Responsive sticky footer for bootstrap
@andreipak
andreipak / log4js_min.js
Created October 20, 2017 06:09
Logging Example: log4js
var log4js = require('log4js');
log4js.configure({
appenders: [
{
"category": "tests",
"type": "logLevelFilter",
"level": "INFO",
"maxLevel": "INFO",
"appender": {
#!/bin/bash
rev=HEAD
for f in $(git ls-tree -r -t --full-name --name-only "$rev") ; do
touch -d $(git log --pretty=format:%cI -1 "$rev" -- "$f") "$f";
done
@andreipak
andreipak / flac2mp3.sh
Created March 21, 2017 16:40
convert flac to mp3
#!/bin/bash
# [all variants] Converting a directory of flac to mp3 320 with ffmpeg
# http://ubuntuforums.org/showthread.php?t=1096665
#
# Convert Flac to Mp3 - ArchWiki
# https://wiki.archlinux.org/index.php/Convert_Flac_to_Mp3
#
# Bash script to convert all *flac to *.mp3 with FFmpeg? - Unix & Linux Stack Exchange
# http://unix.stackexchange.com/questions/114908/bash-script-to-convert-all-flac-to-mp3-with-ffmpeg
@andreipak
andreipak / nodeinstaller.md
Created February 23, 2016 07:54
Windows installer git, node.js, npm, bower, gem, compass, grunt... PowerShell [https://www.youtube.com/watch?v=FCngOUW-UXg]
@andreipak
andreipak / vkcom_audio_download.py
Created November 7, 2015 06:21 — forked from st4lk/vkcom_audio_download.py
Python: vkontakte.ru (vk.com) audio music downloader
# -*- coding: utf-8 -*-
"""
Скрипт для скачивания музыки с сайта vkontakte.ru (vk.com)
Запуск:
python vkcom_audio_download.py
Принцип работы:
Скрипт проверяет сохраненный access_token. Если его нет или срок истек,
то открывается страница в браузере с запросом на доступ к аккаунту.
@andreipak
andreipak / iewmi.vbs
Last active October 15, 2015 16:39
WSH: WMI within MSIE Sample code. [InternetExplorer.Application + Win32_ScheduledJob]
' https://msdn.microsoft.com/en-us/library/aa394599(v=vs.85).aspx [WMI Tasks: Processes]
On Error Resume Next
Set FSO = CreateObject("Scripting.FileSystemObject")
Set MSIE = CreateObject("InternetExplorer.Application")
computer = "."
Set ScheduledJob = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & computer & "\root\cimv2").ExecQuery("select * from Win32_ScheduledJob")
MSIE.Visible = True
SetupMSIE
@andreipak
andreipak / setup-vmware-image-with-static-IP.markdown
Created October 8, 2015 16:11 — forked from pjkelly/setup-vmware-image-with-static-IP.markdown
VMWare Fusion Images with a static IP Address on Mac OS X Snow Leopard

How to setup your VMWare Fusion images to use static IP addresses on Mac OS X

At Crush + Lovely, we use Railsmachine's Moonshine to automate the configuration of our servers. When writing our deployment recipes, VMWare Fusion's ability to take snapshots and rollback to these snapshots is a huge timesaver because it takes just seconds to roll a server image to it's original state.

When you're just configuring a single server, having a static IP address for your server image isn't too important, but when you're configuring multi-server setups, it can be useful to duplicate a number of server images and give each a static IP address so you can consistently deploy to them. While not documented well at all, it turns out that this is relatively easy to accomplish in four simple steps.

1. Determine the MAC address of your guest machine

Let's say you have a guest machine with the name ubuntu-lucid-lynx-base a

@andreipak
andreipak / GIF-Screencast-OSX.md
Created October 8, 2015 13:29 — forked from dergachev/GIF-Screencast-OSX.md
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: