Skip to content

Instantly share code, notes, and snippets.

View skorotkiewicz's full-sized avatar
💻
Programming

Sebastian Korotkiewicz skorotkiewicz

💻
Programming
View GitHub Profile
package com.deviant.security.shield;
public final class BuildConfig {
public static final String BUILD_TYPE = "debug";
public static final boolean DEBUG;
public static final String FLAVOR = "";
public static final String PACKAGE_NAME = "com.deviant.security.shield";
public static final int VERSION_CODE = 4;
public static final String VERSION_NAME = "2.2";
# create backup catalog
mkdir /backup
# clean
aptitude clean
rm /var/log/*.gz
rm /var/log/apache2/*.gz
rm /var/log/apt/*.gz
rm /var/log/clamav/*.gz
rm /var/backups/*.gz
# start archive
@skorotkiewicz
skorotkiewicz / notifymyandroid.php
Created May 2, 2014 03:47
Notification of the new linux kernel on your Android in PHP
<?PHP
function notificationAndroid($apikey, $application, $event, $description, $url) {
$curlchanel = curl_init("https://www.notifymyandroid.com/publicapi/notify");
curl_setopt($curlchanel, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/16.0.2');
curl_setopt($curlchanel, CURLOPT_HEADER, 0);
curl_setopt($curlchanel, CURLOPT_TIMEOUT, 6);
curl_setopt($curlchanel, CURLOPT_RETURNTRANSFER, 0);
curl_setopt($curlchanel, CURLOPT_POSTFIELDS, trim("apikey=$apikey&application=$application&event=$event&description=$description&url=$url"));
curl_exec($curlchanel);

Keybase proof

I hereby claim:

  • I am modinfo on github.
  • I am modinfo (https://keybase.io/modinfo) on keybase.
  • I have a public key whose fingerprint is E556 4C67 88B0 5D6E 4DE1 2E2D 33D6 DECB 626D EAC0

To claim this, I am signing this object:

Verifying that +modinfo is my openname (Bitcoin username). https://onename.io/modinfo
@skorotkiewicz
skorotkiewicz / Nginx proxy_pass
Created May 2, 2014 03:39
Nginx proxy_pass
server {
# listen 66.225.195.83;
server_name synchtube.itunix.eu;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
location / {
proxy_pass http://synchtube.itunix.eu:1337;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
@skorotkiewicz
skorotkiewicz / memetrash.php
Last active October 18, 2016 14:36
PHP Function for API Memetrash
<?php
function lolz($msg) {
$text = ereg_replace("[^A-Za-z0-9 ]", "", $msg);
$text = substr($text, 0, 64);
$curlchanel = curl_init("https://api.memetrash.co.uk/cat");
curl_setopt($curlchanel, CURLOPT_TIMEOUT, 6);
curl_setopt($curlchanel, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curlchanel, CURLOPT_POSTFIELDS, trim("text=$text"));
$wynik=curl_exec($curlchanel);
<?php
function hot($ups, $downs, $date) {
$s = $ups - $downs;
$order = log10(max(abs($s), 1));
if ($s > 0) {
$sign = 1;
} else if ($s < 0) {
$sign = -1;
@skorotkiewicz
skorotkiewicz / IRC2Speech.py
Created December 8, 2016 15:06
IRC to Speech
import socket, string, os, re, time
#some user data, change as per your taste
SERVER = 'irc.freenode.net'
PORT = 6667
NICKNAME = 'MsgToSpeech'
CHANNEL = '#itunix-eu'
#open a socket to handle the connection
IRC = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
@skorotkiewicz
skorotkiewicz / rpispeech.py
Created December 8, 2016 15:07
My Raspberry Pi speech Tweets!
import os, re, time
from twython import TwythonStreamer
# Search terms
TERMS = '#yes'
# Twitter application authentication
APP_KEY = ''
APP_SECRET = ''