Skip to content

Instantly share code, notes, and snippets.

View sfate's full-sized avatar
🇺🇦
Glory to Ukraine, Glory to the Nation, fuck the russian federation! :feelsgood:

Oleksii Bobyriev sfate

🇺🇦
Glory to Ukraine, Glory to the Nation, fuck the russian federation! :feelsgood:
View GitHub Profile
@sfate
sfate / GIF-Screencast-OSX.md
Created October 30, 2019 12:57 — 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:

@sfate
sfate / readme.md
Created June 2, 2019 17:40
Attach and mount an EBS volume to EC2 instance

Attach volume to EC2

1. Head over to EC2 –> Volumes and create a new volume of your preferred size and type.

2. Select the created volume, right click and select the “attach volume” option.

3. Select the instance from the instance text box.

4. Now, login to your ec2 instance and list the available disks:

lsblk
changeMac() {
local net=${1:-en0}
local mac=$(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//')
sudo ifconfig $net ether $mac
sudo ifconfig $net down
sudo ifconfig $net up
echo "Your new physical address for interface $net is $mac"
}
@sfate
sfate / .gitignore
Created November 9, 2017 09:25 — forked from Corgumolax/.gitignore
.gitignore file for ruby on rails project.
#----------------------------------------------------------------------------
# Ignore these files when commiting to a git repository.
#
# See http://help.github.com/ignore-files/ for more about ignoring files.
#
# The original version of this file is found here:
# https://github.com/RailsApps/rails3-application-templates/raw/master/files/gitignore.txt
#
# Corrections? Improvements? Create a GitHub issue:
# http://github.com/RailsApps/rails3-application-templates/issues
@sfate
sfate / pre-commit
Last active May 16, 2017 08:17
Git pre-commit hook
#!/bin/bash
#
# Pre-commit hook script to avoid debug statements to be commited.
# Place under `$PROJECT_DIR/.git/hooks/pre-commit`
# Make script executable `chmod +x $PROJECT_DIR/.git/hooks/pre-commit`
#
# https://github.com/sfate
STATEMENTS="puts\|debugger\|binding.pry\|alert(\|console.log("
OUTPUT=$(git diff --cached --name-only | xargs git grep -wnH " $STATEMENTS" | awk '$0="\t"$0')
@sfate
sfate / Vagrantfile
Created March 29, 2017 17:55 — forked from anthonysterling/Vagrantfile
Handy Vagrantfile for IE testing with Vagrant.
# Usage: IE={box} vagrant up
#
# Eg. IE=XPIE6 vagrant up
boxes = {
"XPIE6" => "http://aka.ms/vagrant-xp-ie6",
"XPIE8" => "http://aka.ms/vagrant-xp-ie8",
"VistaIE7" => "http://aka.ms/vagrant-vista-ie7",
"Win7IE8" => "http://aka.ms/vagrant-win7-ie8",
"Win7IE9" => "http://aka.ms/vagrant-win7-ie9",
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
(function() { 'use strict';
var currentTimeEl = document.querySelector('.ytp-time-current'),
endTimeEl = document.querySelector('.ytp-time-duration'),
replayBtnEl = document.querySelector('.ytp-play-button');
setTimeout(function replay() {
if (
(currentTimeEl.textContent == endTimeEl.textContent)
&&
(replayBtnEl.getAttribute('title') == 'Replay')
@sfate
sfate / gist.md
Created May 23, 2016 12:35
Minitest#Assertions list
Assertion Example
assert assert @traits.any?, "empty subjects"
assert_empty assert_empty @labels
assert_equal assert_equal 2, @traits.size
assert_in_delta assert_in_delta @traits.size, 1,1
assert_in_epsilon assert_in_epsilon @traits.size, 1, 1
assert_includes assert_includes @traits, "skinny jeans"
assert_instance_of assert_instance_of Hipster, @hipster
assert_kind_of assert_kind_of Enumerable, @labels
@sfate
sfate / gist:601d8b29ce06c22e5e40b581f0f8d597
Created May 18, 2016 09:36 — forked from AliMD/gist:3344523
All github Emoji (Smiles)

All github Emoji (Smiles)

ali.md/emoji

:bowtie: | 😄 | 😆 | 😊 | 😃 | ☺️ | 😏 | 😍 | 😘 | :kissing_face: | 😳 | 😌 | 😆 | 😁 | 😉 | :wink2: | 👅 | 😒 | 😅 | 😓

😩 | 😔 | 😞 | 😖 | 😨 | 😰 | 😣 | 😢 | 😭 | 😂 | 😲 | 😱 | :neckbeard: | 😫 | 😠 | 😡 | 😤 | 😪 | 😋 | 😷

😎 | 😵 | 👿 | 😈 | 😐 | 😶 | 😇 | 👽 | 💛 | 💙 | 💜 | ❤️ | 💚 | 💔 | 💓 | 💗 | 💕 | 💞 | 💘 | ✨