Skip to content

Instantly share code, notes, and snippets.

View boo1ean's full-sized avatar
🎯
Focusing

Egor Gumenyuk boo1ean

🎯
Focusing
View GitHub Profile
@benschwarz
benschwarz / pg.md
Last active October 16, 2024 23:15
Awesome postgres
@staltz
staltz / introrx.md
Last active November 14, 2024 11:27
The introduction to Reactive Programming you've been missing
@takeshixx
takeshixx / hb-test.py
Last active November 6, 2024 06:58
OpenSSL heartbeat PoC with STARTTLS support.
#!/usr/bin/env python2
"""
Author: takeshix <[email protected]>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford ([email protected]).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser
@mudkipme
mudkipme / app-base.js
Created August 13, 2013 16:35
Extend Marionette.Application for async initialization
define([
'underscore'
,'marionette'
], function(_, Marionette){
var $ = Marionette.$;
// Extend Marionette.Application for async initialization
var AppBase = Marionette.Application.extend({
constructor: function(options){
@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`
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active November 5, 2024 18:44
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:

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@boo1ean
boo1ean / gist:2971633
Last active October 6, 2015 09:18
Basic user management in *nix
# Create new user - useradd
# -s SHELL : The name of the user's login shell
# -m : Create user’s home directory if it does not exist
# -d HOME_DIR : Home directory of the new user
# -c COMMENT : Some description of user
# -g GROUP : Group name of the new user
# USERNAME : Name of the new user
#
# And here is an example:

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: