Skip to content

Instantly share code, notes, and snippets.

View iagox86's full-sized avatar

Ron Bowes iagox86

View GitHub Profile
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();
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,
}
})
}
#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]);
}
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!
#!/usr/bin/env ruby
@l33t = [
["a", "4"],
["a", "@"],
#["a", "/-\\"],
#["a", "/\\"],
#["a", "^"],
["b", "8"],
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
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]
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]
41 inc ecx
41 inc ecx
41 inc ecx
41 inc ecx
41 inc ecx
41 inc ecx
41 inc ecx
41 inc ecx
41 inc ecx
41 inc ecx
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