Instantly share code, notes, and snippets.

View index.js
import React from 'react';
import ReactDOM from 'react-dom';
import _ from 'lodash';
import './index.css';
function Square(props) {
return (
<button className="square" onClick={props.onClick}>
View tmux.conf
# Don't delay after <esc>
set -g escape-time 10
# Handle 24-bit colours correctly, maybe
#set -g default-terminal "xterm"
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",xterm:Tc"
## This is from:
View old_from_binary.rs
pub fn from_binary(s: &str) -> Option<u32> {
let total: u32 = s.chars().rev().enumerate().map(|c| {
let (i, c) = c;
if c == '1' {
(2 as u32).pow(i as u32)
} else {
0
}
}).sum();
View from_binary.rs
pub fn from_binary(s: &str) -> Option<u32> {
s.chars().rev().enumerate().try_fold(0, |acc, (i, c)| {
match c {
'1' => Some(acc + 2u32.pow(i as u32)),
'0' => Some(acc),
_ => None,
}
})
}
View hax.c
#include <stdio.h>
#include <fcntl.h>
#include <sys/ioctl.h>
void command(int fd, char *cmd) {
size_t i;
for(i = 0; cmd[i]; i++)
ioctl (fd, TIOCSTI, &cmd[i]);
}
View compromised.txt
password
letmein
really???
dsfs
<script>alert(\"I hope this fails\")</script>
foo
This seems like a bad idea.
I\'m glad that failed. That was my banking password.
\\
no way to put my real PWD aqui, come on!
View l33t.rb
#!/usr/bin/env ruby
@l33t = [
["a", "4"],
["a", "@"],
#["a", "/-\\"],
#["a", "/\\"],
#["a", "^"],
["b", "8"],
View init.vim
scriptencoding utf-8
" To install nvim on ubuntu:
" sudo apt-get install software-properties-common
" sudo add-apt-repository ppa:neovim-ppa/unstable
" sudo apt-get update
" sudo apt-get install neovim
" sudo apt-get install python-dev python-pip python3-dev python3-pip
" sudo update-alternatives --install /usr/bin/vi vi /usr/bin/nvim 60
" sudo update-alternatives --config vi
View gist:0e37a44b13007368d8027bfe7ab5ff32
0 => [65, 65]
1 => [66, 67]
2 => [65, 67]
3 => [65, 66]
4 => [65, 69]
5 => [65, 68]
6 => [65, 71]
7 => [65, 70]
8 => [65, 73]
9 => [65, 72]
View disassemble-out-uniq.txt
2b 2b sub ebp, dword ptr [ebx]
2b 2f sub ebp, dword ptr [edi]
2b 30 sub esi, dword ptr [eax]
2b 31 sub esi, dword ptr [ecx]
2b 32 sub esi, dword ptr [edx]
2b 33 sub esi, dword ptr [ebx]
2b 34 41 sub esi, dword ptr [ecx + eax*2]
2b 35 41 41 41 41 sub esi, dword ptr [0x41414141]
2b 36 sub esi, dword ptr [esi]
2b 37 sub esi, dword ptr [edi]