Skip to content

Instantly share code, notes, and snippets.

View gnusosa's full-sized avatar

Carlos Sosa gnusosa

View GitHub Profile
ssh [email protected] -vvv
OpenSSH_6.7p1 Debian-3, OpenSSL 1.0.1k 8 Jan 2015
debug1: Reading configuration data /home/gnusosa/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to sf.tmate.io [192.241.193.106] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/gnusosa/.ssh/id_rsa type -1
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CFLAGS="-march=corei7 -O2 -pipe"
CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="x86_64-pc-linux-gnu"
# These are the USE flags that were used in addition to what is provided by the
package com.example.unionfind;
/**
* Created by gnusosa on 2/5/15.
*/
public class QuickFindUF {
private int[] id;
public QuickFindUF(int N)
import Data.Digits
import Data.Maybe
data Isbn = Isbn { isbn10 :: Maybe Isbn10
, isbn13 :: Maybe Isbn13 }
deriving (Eq, Show)
data Isbn10 = Isbn10 Int deriving (Eq, Show)
data Isbn13 = Isbn13 Int deriving (Eq, Show)
(defun gnus-gmane-link ()
"Grabs the article name and generates a url found in Gmane.
If successful, sends it to the local web browser."
(interactive)
(let ((url
(with-current-buffer gnus-article-buffer
(let ((msgids (split-string (aref gnus-current-headers 8) "[ :]")))
(cond ((and (equal (substring (second msgids) 0 6)
"gwene.")
(goto-char (point-max))
@gnusosa
gnusosa / gnus-gmane-link.el
Created October 21, 2014 00:20
gnus-gmane-gwene-link
(defun new ()
(let ((path
(read-directory-name "Path: " nil "")))
(princ path)))
(defvar gnus-user-format-function-g-prev "" "")
(defun empty-common-prefix (left right)
"Given `left' '(\"foo\" \"bar\" \"fie\") and `right' '(\"foo\"
\"bar\" \"fum\"), return '(\" \" \" \" \"fum\")."
(if (and (cdr right) ; always keep the last part of right
(equal (car left) (car right)))
(cons (make-string (length (car left)) ? )
(empty-common-prefix (cdr left) (cdr right)))
right))
(defun gnus-user-format-function-g (arg)
.chart {
background: #b0e0f8;
margin: 5px;
}
.chart rect {
stroke: white;
fill: steelblue;
}
@gnusosa
gnusosa / git_log_decorate
Created January 3, 2013 19:33
A better git log
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"