Skip to content

Instantly share code, notes, and snippets.

View AndersonFirmino's full-sized avatar
🐍
📜 🎼 🎮 🐧 🦆

Anderson Araujo AndersonFirmino

🐍
📜 🎼 🎮 🐧 🦆
View GitHub Profile

Strings

String.prototype.*

None of the string methods modify this – they always return fresh strings.

  • charAt(pos: number): string ES1

    Returns the character at index pos, as a string (JavaScript does not have a datatype for characters). str[i] is equivalent to str.charAt(i) and more concise (caveat: may not work on old engines).

@AndersonFirmino
AndersonFirmino / lisp.c
Created May 18, 2018 10:48 — forked from sanxiyn/lisp.c
Lisp
#include <assert.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
enum type {
NIL,
# Enumerate databases
sqlmap --dbms=mysql -u "$URL" --dbs

# Enumerate tables
sqlmap --dbms=mysql -u "$URL" -D "$DATABASE" --tables

# Dump table data
sqlmap --dbms=mysql -u "$URL" -D "$DATABASE" -T "$TABLE" --dump
@AndersonFirmino
AndersonFirmino / fn.py
Created April 11, 2018 18:33 — forked from dunossauro/fn.py
random par ou impar (functional example)
"""
Exemplo para ajudar a responder o problema de aninhamento em https://gist.github.com/AndersonFirmino/b0300923094a5a8450018c5bd32c9de8
"""
from itertools import filterfalse
from functools import partial
from random import choice, random
def pipe(*funcs):
def inner(data, funcs=funcs):
result = data
@AndersonFirmino
AndersonFirmino / Strong Password RegEx
Created April 3, 2018 20:32 — forked from ravibharathii/Strong Password RegEx
A Regular Expression for a Strong Password
Description of this regular expression is as below:
Passwords will contain at least 1 upper case letter
Passwords will contain at least 1 lower case letter
Passwords will contain at least 1 number or special character
Passwords will contain at least 8 characters in length
Password maximum length should not be arbitrarily limited
(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$
@AndersonFirmino
AndersonFirmino / bench_client.py
Created March 20, 2018 01:16 — forked from iwanbk/bench_client.py
flask with ujson & json benchmark
#!/usr/bin/env python
import timeit
import jsonrpclib
import ujson
import requests
N_TEST = 10000
server_json = jsonrpclib.Server('http://localhost:8000/json/')
@AndersonFirmino
AndersonFirmino / flask_dump_request_response.py
Created March 15, 2018 12:38 — forked from TheWaWaR/flask_dump_request_response.py
Flask dump request and response example
#!/usr/bin/env python
# coding: utf-8
import os
import sys
import json
import uuid
import tempfile
from flask import Flask, request, Response, g
@AndersonFirmino
AndersonFirmino / gist:ad2220628b02fe17d561099710e628b3
Created March 15, 2018 12:14 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@AndersonFirmino
AndersonFirmino / git_branch_naming.md
Created March 15, 2018 12:14 — forked from revett/git_branch_naming.md
Git Branch Naming Conventions

<type>/<name>

<type>

bug    - Code changes linked to a known issue.
feat   - New feature.
hotfix - Quick fixes to the codebase.
junk   - Experiments (will never be merged).
@AndersonFirmino
AndersonFirmino / iterm2-solarized.md
Created March 11, 2018 21:03 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k