Skip to content

Instantly share code, notes, and snippets.

View fasetto's full-sized avatar
😈

Serkan Bircan fasetto

😈
View GitHub Profile
#!/usr/bin/python
import argparse
import random
import requests
import string
import socket
import sys
from threading import Thread
import sys
import requests
import cPickle
from base64 import b64encode
from hashlib import md5
if len(sys.argv) < 2:
print "[*] usage: pwn.py <ip> <port>"
sys.exit(0)
@fasetto
fasetto / pattern.py
Last active August 19, 2018 08:47
Generates cyclic pattern
#!/usr/bin/env python3
import sys
from string import ascii_uppercase, ascii_lowercase, digits
MAX_PATTERN_LENGTH = 20280
class MaxLengthException(Exception):
pass
@fasetto
fasetto / action-helpers.ts
Last active April 26, 2018 11:24
TypeScript FSA Sample
import { Action, ActionWithPayload } from './types';
export function createAction<T extends string>(type: T): Action<T>;
export function createAction<T extends string, P>(type: T, payload: P): ActionWithPayload<T, P>;
export function createAction<T extends string, P>(type: T, payload?: P) {
return payload === undefined ? { type } : { type, payload };
}
@fasetto
fasetto / list.ts
Last active April 25, 2018 17:19
Predicate Sample
type Predicate<T> = (item: T) => boolean;
function filter<T> (source : T[], callback : Predicate<T>) {
const temp = [];
for (let item of source) {
if (callback(item)) {
temp.push(item);
@fasetto
fasetto / typescipt-intersection-sample.ts
Last active April 25, 2018 17:20
TypeScript intersection sample.
interface IStudent {
id: string;
age: number;
}
interface IWorker {
companyId: string;
}
type A = IStudent & IWorker;
<?xml version="1.0" encoding="UTF-8" ?>
<phpunit bootstrap="vendor/autoload.php"
colors="true"
verbose="true"
stopOnFailure="false">
<testsuites>
<testsuite name="Test suite1">
<directory>tests</directory>
<!-- <file>file-path</file> -->
; top-most EditorConfig file
root = true
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4
@fasetto
fasetto / normalize.scss
Last active April 15, 2018 17:02
Normalize CSS
/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
@fasetto
fasetto / index.html
Last active February 6, 2018 14:38
CSS Grid Sample
<div class="wrapper">
<!-- Navigation -->
<nav class="main-nav">
<ul>
<li>
<a href="#">Home</a>
</li>
<li>
<a href="#">About</a>
</li>