Skip to content

Instantly share code, notes, and snippets.

View Nitive's full-sized avatar

Maxim Samoilov Nitive

View GitHub Profile
@mrgrain
mrgrain / pinentry-1password.sh
Last active February 28, 2024 16:55
1Password CLI pinentry for gpg-agent
#!/bin/sh
COMMAND="op read $OP_PIN_ITEM"
echo "OK"
while read cmd rest; do
echo "cmd=$cmd rest=$rest" >&2
echo "cmd=$cmd rest=$rest" >> $LOG
case "$cmd" in
\#*)
@ityonemo
ityonemo / test.md
Last active May 8, 2024 20:17
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

@mokevnin
mokevnin / README.md
Last active April 1, 2016 14:02
Hexlet Workshop #1

Что это?

Hexlet Workshop - четырех часовое мероприятие, которое направлено на прокачку новых навыков в новых для себя областях. Проводится для всех желающих.

Что прокачивается?

  • Написание тестов.
  • Работа с Docker.
  • Новый язык/технология.
  • Элементы экстремального программирования (TDD, Парное программирование).
@alexeyraspopov
alexeyraspopov / .babelrc
Last active August 23, 2016 08:51
Watchify + React + HMR
{
"env": {
"development": {
"plugins": ["react-transform"],
"extra": {
"react-transform": {
"transforms": [{
"transform": "react-transform-hmr",
"imports": ["react"],
"locals": ["module"]
@jed
jed / progress.js
Last active March 11, 2016 08:37
Using template strings as progress bars
"use strict"
function progress(strs, current, total) {
let str = `${strs[0]}${current}${strs[1]}${total}${strs[2]}`
let ratio = Math.min(Math.max(current / total, 0), 1)
let length = Math.floor(ratio * str.length)
let pattern = new RegExp(`^.{${length}}`)
return str.replace(pattern, "\x1b[4m$&\x1b[0m")
}
@tlrobinson
tlrobinson / redux-devtools-separate-window.js
Last active August 20, 2019 23:54
Put the awesome redux-devtools in it's own window so it doesn't obscure or be obscured by your application
// give it a name so it reuses the same window
var win = window.open(null, "redux-devtools", "menubar=no,location=no,resizable=yes,scrollbars=no,status=no");
// reload in case it's reusing the same window with the old content
win.location.reload();
// wait a little bit for it to reload, then render
setTimeout(function() {
React.render(
<DebugPanel top right bottom left >
@adamreisnz
adamreisnz / Terminal commands
Last active May 8, 2020 09:49
A bunch of useful terminal commands
Terminal commands
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 9, 2024 06:43
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname