Skip to content

Instantly share code, notes, and snippets.

View alep's full-sized avatar
🐙
Vamo' a calamarno

Alejandro Peralta alep

🐙
Vamo' a calamarno
View GitHub Profile
@alep
alep / main.go
Last active August 29, 2015 14:27
Web crawler from the tour of go.
package main
import (
"fmt"
)
type Fetcher interface {
// Fetch returns the body of URL and
// a slice of URLs found on that page.
Fetch(url string) (body string, urls []string, err error)
#python3
import numpy as np
from itertools import product
from scipy.spatial.distance import euclidean
coords = [(35.0456, -85.2672),
(35.1174, -89.9711),
(35.9728, -83.9422),
(36.1667, -86.7833)]
@alep
alep / curl.md
Created July 5, 2017 14:35 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

Keybase proof

I hereby claim:

  • I am alep on github.
  • I am alep (https://keybase.io/alep) on keybase.
  • I have a public key ASB5OL0YFwaQhbCxoVZbHr9cUkILo_YgfXg2isMxUQdl7go

To claim this, I am signing this object:

@alep
alep / CONDTIONALS
Created April 23, 2021 15:54 — forked from alptugan/CONDTIONALS
Sonic Pi Cheat Sheet
So, let’s flip a coin: if it’s heads, play a drum, if it’s tails, play a cymbal. Easy. We can emulate a coin flip with our one_in function (introduced in the section on randomness) specifying a probability of 1 in 2: one_in(2). We can then use the result of this to decide between two pieces of code, the code to play the drum and the code to play the cymbal:
loop do
if one_in(2)
sample :drum_heavy_kick
else
sample :drum_cymbal_closed
end
@alep
alep / spacemacs-keybindings
Created September 1, 2021 12:00 — forked from adham90/spacemacs-keybindings
spacemacs keybindings that i need to learn
SPC s c remove highlight
**** Files manipulations key bindings
Files manipulation commands (start with ~f~):
| Key Binding | Description |
|-------------+----------------------------------------------------------------|
| ~SPC f c~ | copy current file to a different location |
| ~SPC f C d~ | convert file from unix to dos encoding |
| ~SPC f C u~ | convert file from dos to unix encoding |
@alep
alep / tcp_flags.txt
Created August 15, 2023 12:54 — forked from tuxfight3r/tcp_flags.txt
tcpdump - reading tcp flags
##TCP FLAGS##
Unskilled Attackers Pester Real Security Folks
==============================================
TCPDUMP FLAGS
Unskilled = URG = (Not Displayed in Flag Field, Displayed elsewhere)
Attackers = ACK = (Not Displayed in Flag Field, Displayed elsewhere)
Pester = PSH = [P] (Push Data)
Real = RST = [R] (Reset Connection)
Security = SYN = [S] (Start Connection)