Skip to content

Instantly share code, notes, and snippets.

View sumerman's full-sized avatar
🔮
DATABASE, DATABASE, JUST LIVING IN A DATABASE

Valery Meleshkin sumerman

🔮
DATABASE, DATABASE, JUST LIVING IN A DATABASE
View GitHub Profile
@stefan-mees
stefan-mees / gist:122d88308bbe5e9e43ab
Last active December 25, 2015 19:19
debug stuck ruby
require 'socket'
require 'timeout'
while true
Dir.glob('/home/ubuntu/applications/xx/shared/sockets/*.sock').each do |socket|
instance = $1 if socket =~ /([^\/]+)\.sock$/
s = nil
begin
Timeout.timeout(0.5) do
@wsargent
wsargent / docker_cheat.md
Last active June 29, 2024 19:32
Docker cheat sheet
@scy
scy / README.md
Last active December 23, 2024 01:58
My OSX PF config for #30C3.

My OS X “VPN only” Setup For #30C3

You should never let passwords or private data be transmitted over an untrusted network (your neighbor’s, the one at Starbucks or the company) anyway, but on a hacker congress like the #30C3, this rule is almost vital.

Hackers get bored easily, and when they’re bored, they’re starting to look for things to play with. And a network with several thousand connected users is certainly an interesting thing to play with. Some of them might start intercepting the data on the network or do other nasty things with the packets that they can get.

If these packets are encrypted, messing with them is much harder (but not impossible! – see the end of this article). So you want your packets to be always encrypted. And the best way to do that is by using a VPN.

Target audience

@dpwiz
dpwiz / Hedis.hs
Last active August 29, 2015 14:01
Scotty application skeleton
module Hedis
(
-- * Application classes
HasRedis(..)
-- * App-wrapped redis runner
, redis
-- * Re-export other stuff from "Database.Redis"
, module R
) where
@webbj74
webbj74 / name.webbj74
Created June 13, 2014 23:21
OSX Packet Filter Rules for using privateinternetaccess.com VPN
#
# OSX packet filter rules
# References:
# * https://gist.github.com/scy/8122924
#
# The purpose of this config is to make sure that my system uses the
# privateInternetAccess VPN connection for everything and not to communicate
# unencrypted when the VPN connection goes down. Therefore, I block
# everything on the physical interfaces except for ICMP, DHCP, DNS and the
-module(picoparser).
-export([ str/0
, str/1
, str_/0
, seq/1
, any/1
, whatever/0
, many/1
, match/1
@LeebDeveloper
LeebDeveloper / niftest.erl
Created June 30, 2014 15:25
Erlang NIF in pure Rust
-module(niftest).
-export([add/2]).
-on_load(init/0).
init() ->
ok = erlang:load_nif("./nif", 0).
add(_, _) ->
exit(nif_library_not_loaded).
@kachayev
kachayev / css-parser.md
Last active November 12, 2022 04:20
Parsing CSS file with monadic parser in Clojure
@kachayev
kachayev / concurrency-in-go.md
Last active May 4, 2025 05:48
Channels Are Not Enough or Why Pipelining Is Not That Easy
@pnc
pnc / observer.md
Last active April 1, 2025 21:38
Using Erlang observer/appmon remotely

Using OTP's observer (appmon replacement) remotely

$ ssh remote-host "epmd -names"
epmd: up and running on port 4369 with data:
name some_node at port 58769

Note the running on port for epmd itself and the port of the node you're interested in debugging. Reconnect to the remote host with these ports forwarded:

$ ssh -L 4369:localhost:4369 -L 58769:localhost:58769 remote-host