Skip to content

Instantly share code, notes, and snippets.

View lpenz's full-sized avatar
🐧
🦀 🐊

Leandro Lisboa Penz lpenz

🐧
🦀 🐊
View GitHub Profile
@diogob
diogob / .spacemacs
Last active January 26, 2017 10:56
Spacemacs config file
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@tboby
tboby / Referee.java
Created May 14, 2017 20:30
Code4life cg-brutaltester referee
import java.awt.Point;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.StringReader;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@NegativeMjark
NegativeMjark / identicon.py
Last active July 3, 2017 10:41
Identicon Generator Webapp
#! /usr/bin/env python
from flask import Flask, make_response
from io import BytesIO
from pydenticon import Generator
app = Flask(__name__)
foreground = [
"rgb(45,79,255)",
@suewonjp
suewonjp / toggle-qf-win.vim
Created June 7, 2016 08:51
[vim tip] Toggle Quickfix Window
function! ToggleQuickfix()
let l:nr = winnr("$")
if l:nr == 1
copen
else
cclose
endif
endfunction
@joepie91
joepie91 / .md
Last active March 17, 2023 18:42
Nix in multi-user mode on a non-NixOS (eg. Debian) system

This post is deprecated!

Its contents have been moved to the NixOS wiki here, where they are being kept up to date. Please follow the instructions there instead!

The original post is below for posterity.

 

 

@oneamtu
oneamtu / gtest.cmake
Created September 16, 2012 20:38
How to add google test as an downloadable external project
########################### GTEST
# Enable ExternalProject CMake module
INCLUDE(ExternalProject)
# Set default ExternalProject root directory
SET_DIRECTORY_PROPERTIES(PROPERTIES EP_PREFIX ${CMAKE_BINARY_DIR}/third_party)
# Add gtest
# http://stackoverflow.com/questions/9689183/cmake-googletest
ExternalProject_Add(
@nrc
nrc / tools.md
Last active August 2, 2023 16:40
Rust tooling

Rust developer tools - status and strategy

Availability and quality of developer tools are an important factor in the success of a programming language. C/C++ has remained dominant in the systems space in part because of the huge number of tools tailored to these lanaguages. Succesful modern languages have had excellent tool support (Java in particular, Scala, Javascript, etc.). Finally, LLVM has been successful in part because it is much easier to extend than GCC. So far, Rust has done pretty well with developer tools, we have a compiler which produces good quality code in reasonable time, good support for debug symbols which lets us leverage C++/lanaguge agnostic tools such as debuggers, profilers, etc., there are also syntax highlighting, cross-reference, code completion, and documentation tools.

In this document I want to layout what Rust tools exist and where to find them, highlight opportunities for tool developement in the short and long term, and start a discussion about where to focus our time an

@N0dr4x
N0dr4x / Scapy_TcpSession.py
Last active November 5, 2023 14:13
Simple Scapy TCP Session
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Author: N0dr4x (n0dr4x@protonmail.com)
'''
Simple Scapy TCP Session class that provide ability
to :
- execute the 3-way handshake (eg. connect)
- properly close connection (->FIN/ACK, <-FIN/ACK, ->ACK )
- send automatic acknowledgment of received tcp data packet
@mjlbach
mjlbach / gccEmacs.md
Last active December 6, 2023 10:34
Installing gccEmacs (native-comp) with Nix

WARNING: THIS GIST IS OUT OF DATE AND NO LONGER RELEVANT

  • Native-comp was enabled by default in nixpgks
  • Pgtk is not enabled by default, for that you can either override the derivation or use emacsPgtk from the nix-community emacs overlay if you don't want to build it yourself

Nix

Adding the overlay and configuring cachix

Multi user nix installation

Each section should be run as the user or as root, pay attention to which one!

Install nix single user

As $USER

curl https://nixos.org/nix/install | sh