Skip to content

Instantly share code, notes, and snippets.

🌺

Phil Pirozhkov pirj

🌺
View GitHub Profile
@mdPlusPlus
mdPlusPlus / compile_newest_stable_kernel_with_acso_patch.sh
Last active Jul 31, 2020
Download, patch, compile and install the newest stable Linux kernel with the ACS override patch (Ubuntu / Debian)
View compile_newest_stable_kernel_with_acso_patch.sh
#!/bin/bash
function install_dependencies() {
echo "Installing dependencies..."
sudo apt -qq update
sudo apt -qq install -y curl git wget
sudo apt -qq install -y bison flex kernel-package libelf-dev libssl-dev
}
function init() {
@mturquette
mturquette / .offlineimaprc
Created Jan 18, 2016
OfflineIMAP nametrans and folderfilter example
View .offlineimaprc
[Repository local-baylibre]
...
nametrans = lambda folder: {
'drafts': '[Gmail]/Drafts',
'flagged': '[Gmail]/Starred',
'important': '[Gmail]/Important',
'inbox': 'INBOX',
'spam': '[Gmail]/Spam',
'trash': '[Gmail]/Trash',
}.get(folder, folder)
@hubertgrzeskowiak
hubertgrzeskowiak / NodeJS D3 with JSDOM
Last active Mar 15, 2019
Using d3.js (aka Data-Driven Documents) without browser with help of jsdom. This allows for server-side rendering or programmatic use in any other contexts than browser.
View NodeJS D3 with JSDOM
d3 = require("d3");
jsdom = require("jsdom");
document = jsdom.jsdom();
window = document.parentWindow;
var sampleSVG = d3.select(document.body)
.append("svg")
.attr("width", 100)
.attr("height", 100)
@estum
estum / switch_on.rb
Last active Jan 13, 2017
Ruby alternative switch-case syntax.
View switch_on.rb
# = Kernel#switch
# Provides alternative switch-case syntax.
#
# # support methods:
# value = []
# switch value do
# on empty?: -> { "none" }
# on one?: -> { "one" }
# on many?: -> { "many" }
# end
@gcarrion-gfrmedia
gcarrion-gfrmedia / 0000_packages.config
Created Apr 29, 2014
AWS Elastic Beanstalk Ruby 2.0/Puma Environment - .ebextensions tweaks and Sidekiq configuration. This is known to work fine with AWS Elastic Beanstalk 's 64bit Amazon Linux 2014.03 v1.0.1 running Ruby 2.0 (Puma) stack. Later stack versions might not work, but for that specific version works fine.
View 0000_packages.config
# Install Git needed for Git based gems
packages:
yum:
git: []
@swarminglogic
swarminglogic / watchfile.sh
Last active Jun 4, 2020
watchfile - monitor file(s) and execute a command when files are changed
View watchfile.sh
#!/bin/bash
version=1.0.1
versionDate="2014-02-14"
function showHelp() {
echo "watchfile - monitor file(s)/command and perform action when changed
Possible ways of usage
----------------------------------------
@XVilka
XVilka / TrueColour.md
Last active Aug 2, 2020
True Colour (16 million colours) support in various terminal applications and terminals
View TrueColour.md

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)
@vrybas
vrybas / how-do-i-pomodoro.md
Last active Mar 12, 2019
Vladimir Rybas - How do I Pomodoro
View how-do-i-pomodoro.md

vrybas.github.io

How do I Pomodoro

I'm a big fan of Pomodoro time management technique, created by Francesco Cirillo in the 80's. In this post I'll describe what it is, how I use it (tools and their tweaks), and how it helps me to get through my day.

Interruptions

@ZeroIsALoop
ZeroIsALoop / NodeListUtils.js
Created Jun 25, 2013
Extend NodeList object with some useful iteration utility functions
View NodeListUtils.js
[].forEach.call( document.querySelectorAll(sel), function(el) {
});
NodeList.prototype.forEach = Array.prototype.forEach;
NodeList.prototype.forEach = HTMLCollection.prototype.forEach = Array.prototype.forEach;
NodeList.prototype.forEach = HTMLCollection.prototype.forEach = Array.prototype.forEach;
NodeList.prototype.map = HTMLCollection.prototype.map = Array.prototype.map;
NodeList.prototype.filter = HTMLCollection.prototype.filter = Array.prototype.filter;
View gist:5329458
set langmap=ёйцукенгшщзхъфывапролджэячсмитьбюЁЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ;`qwertyuiop[]asdfghjkl\\;'zxcvbnm\\,.~QWERTYUIOP{}ASDFGHJKL:\\"ZXCVBNM<>
nmap Ж :
" yank
nmap Н Y
nmap з p
nmap ф a
nmap щ o
nmap г u
nmap З P
You can’t perform that action at this time.