Skip to content

Instantly share code, notes, and snippets.

View ipoddubny's full-sized avatar

Ivan Poddubny ipoddubny

  • ipnordic
  • Denmark
View GitHub Profile
@chrisroos
chrisroos / gpg-import-and-export-instructions.md
Created September 9, 2011 10:49
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...

@mfukar
mfukar / inspector_malloc.gdb
Last active May 9, 2023 11:04
gdb functions to dump glibc malloc arenas + chunks
define -mem-heap-dump-chunk
printf "%#016x: ", $mem_addr
printf "%016lu %016lu %#02x ", ((long *)$mem_addr)[0], ((long *)$mem_addr)[1] & ~3, ((long*)$mem_addr)[1] & 3
printf "%016x %016x\n", ((long *)$mem_addr)[2], ((long *)$mem_addr)[3]
set $mem_addr = $mem_addr + ((long *)$mem_addr)[1] & ~3
end
document -mem-heap-dump-chunk
!!! FOR INTERNAL USE ONLY - DO NOT CALL !!!
end
@orymate
orymate / core-sounds-hu.csv
Created July 23, 2012 20:26
Asterisk Hungarian voice files (magyar hangfájlok)
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 1 column, instead of 7. in line 9.
agent-alreadyon: Az ügynök már be van jelentkezve. Adja meg az ügynökszámát és egy kettős keresztet.
agent-incorrect: A bejelentkezés sikertelen. Adja meg az ügynökszámát és egy kettős keresztet.
agent-loggedoff: Ügynök kijelentkezett.
agent-loginok: Ügynök bejelentkezett.
agent-newlocation: Adjon meg egy új melléket és egy kettős keresztet.
agent-pass: Adja meg a jelszót és egy kettős keresztet.
agent-user: Ügynök bejelentkezés. Adja meg az ügynökszámot és egy kettős keresztet.
auth-incorrect: Hibás jelszó. Adja meg újra a jelszót és egy kettős keresztet.
auth-thankyou: Köszönjük.
conf-adminmenu-162: A némításhoz vagy annak megszüntetéséhez nyomja meg az egyes gombot, a konferencia lezárásához vagy annak megszüntetéséhez a kettest, az utolsó felhasználó kizárásához a hármast, a hangerő beállításához a négyest vagy a hatost, a konferencia bővítéséhez az ötöst, a saját hangerő szabályozásához a hetest vagy kilencest, a kilépéshez a nyolcast.
@jdkanani
jdkanani / notepad.html
Last active June 16, 2024 13:44 — forked from jakeonrails/Ruby Notepad Bookmarklet
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`
@freeformz
freeformz / WhyILikeGo.md
Last active October 6, 2022 23:31
Why I Like Go

A slightly updated version of this doc is here on my website.

Why I Like Go

I visited with PagerDuty yesterday for a little Friday beer and pizza. While there I got started talking about Go. I was asked by Alex, their CEO, why I liked it. Several other people have asked me the same question recently, so I figured it was worth posting.

Goroutines

The first 1/2 of Go's concurrency story. Lightweight, concurrent function execution. You can spawn tons of these if needed and the Go runtime multiplexes them onto the configured number of CPUs/Threads as needed. They start with a super small stack that can grow (and shrink) via dynamic allocation (and freeing). They are as simple as go f(x), where f() is a function.

@tyre
tyre / gist:5561992
Last active December 17, 2015 05:59
Stop developing for the 90% use case

TLDR:

Please stop overvaluing your time at the expense of your users. It is easy to get caught up in a features pissing contest with that other startup down the road, but don't lose sight of your mission. Take one problem that people have and solve it. Well. All of it. All of the time.

Last year I read the wonderfully concise essay Half, Not Half-Assed by the 37 Signals team.

It took me more than five minutes to figure it out, but the time spent thinking was definitely worth it. Talking with coworkers, friends, or conference attendees about those handful of paragraphs reinforces this.

@willurd
willurd / web-servers.md
Last active June 29, 2024 17:26
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@harith
harith / shellmarks.sh
Last active September 18, 2022 07:50
Utilities to let you easily reach frequently visited but deeply nested directories.
# Utilities for quickly accessing frequently used directories in bash.
# Usage:
# $ cd /path/to/project/src/
# $ mark code # Will create a new shortcut.
# # Becomes interactive if a shortcut already exists
# # m is an alias for mark. You can also `m code`
#
# $ code # From now on, running this anywhere in the shell
# # will put you in /path/to/project/src/code
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active June 16, 2024 13:44
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@mistakster
mistakster / FollowFriday_2015-07-10.md
Last active August 29, 2015 14:24
#FollowFriday list (2015-07-10)

Список #FollowFriday от 2015-07-10 по версии @jsunderhood

Ещё один энтузиаст React. Великолепно, что опыты Дэна @dan_abramov делают счастливыми не только его, но и нас.

Вячеслав @vslinko экспериментирует с React и не пишет в твиттер всяких глупостей. Только JS, только хардкор!

Любознательный разработчик Алексей @alexeyraspopov и его гитхаб https://github.com/alexeyraspopov

Ингвар @RReverser рассказывает по-английски про инструменты разработки JS-программиста