Skip to content

Instantly share code, notes, and snippets.

View mateusza's full-sized avatar

Mateusz Adamowski mateusza

View GitHub Profile
config_arp_hosts(){
echo "graph_title ARP hosts
graph_args --base 1000 -l 0
graph_vlabel hosts
graph_scale no
graph_category network"
for IFACE in $( ifconfig | grep -B 1 "inet addr" | grep Link | grep -v "^lo" | cut -d " " -f 1 )
do
echo "$IFACE.label $IFACE"
#include <stdio.h>
typedef struct pair_struct {
unsigned short a;
unsigned short b;
} pair;
unsigned int swap( unsigned int );
pair procedure( pair, unsigned short );
void show_pair( pair );
<?php
function hello(){
~~~ ~~~ ~~~~~~~ ~~~ ~~~ ~~~~~
~~~ ~~~ ~~~~~~~ ~~~ ~~~ ~~~~~~~~~
~~~ ~~~ ~~~ ~~~ ~~~ ~~~ ~~~
~~~~print ~"\xb7" .~~ ~~~ "\xba" .~~~
~~"\xb3". ~"\xb3" .~~ ~~~ "\xb0" .~~~
~~~ ~~~ ~~~ ~~~ ~~~ ~~~ ~~~
~~~ ~ ~ "\xf5" .~~~~~~~ ~~~~~~~~ ~~~~~~~~

IKEA

dowolny market budowlany

  • kosiarka elektryczna
  • wiertarka
  • przedłużacz elektryczny ogrodowy

domowe

  • talerzyki deserowe
#include <stdio.h>
void main(){
printf("%d %s\n", 0[(int*)"ground speed"], "km/h" );
}
#!/bin/bash
# (C) 2017, Mateusz Adamowski
# public domain
#
# (compare with reference JS implementation: http://jsfiddle.net/russau/ch8PK/ )
SECRET32="jbswY3DPEHPK3PXP"
base32_decode(){
@mateusza
mateusza / rsa-bignum.php
Last active May 27, 2017 22:54
RSA explained with PHP
<?php
function rsa_demo(){
list( $p, $q ) = get_2_primes();
echo "p = $p\n";
echo "q = $q\n";
$n = bcmul( $p, $q );
echo "n = p * q = $n\n";
@mateusza
mateusza / README.md
Last active March 13, 2018 17:25
test1

Hello world

OK

not so ok

( ( tab ) => tab
.map(
(v1,k1) => tab
.map( (v2,k2) => [v1,v2,k1,k2] )
.filter( p => p[2] < p[3] )
.map( p => [p[0],p[1]] )
)
.reduce(
(a,b) => [...a,...b]
)
#!/bin/bash
n=razi91
openssl genrsa -out $n.key
openssl rsa -pubout -in $n.key -out $n.pub
openssl req -new -sha256 -key $n.key -subj '/CN=127.0.0.1/' -out $n.csr
openssl x509 -req -in $n.csr -signkey $n.key -out $n.crt -days 30