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 / 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 / liquidsoap.sh
Created May 2, 2014 03:43
Liquidsoap: AutoDJ for icecast
#!/usr/bin/liquidsoap
set("log.file.path","/tmp/basic-radio.log")
# required speech synthesizer, aptitude install festival
message = "That's it! you listening the radio dubstep is our life, listen to us at school, at home or at a party with friends"
messagesorry = "Sorry for the inconvenience, continuation of the program soon!"
welcome = single("say:"^message)
sorryvoice = single("say:"^messagesorry)
@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

Keybase proof

I hereby claim:

  • I am skorotkiewicz on github.
  • I am modinfo (https://keybase.io/modinfo) on keybase.
  • I have a public key ASC5zy1v9Wn4Is9YyYbgWWJjN3yZkPm3IpcOCwNexit21wo

To claim this, I am signing this object:

@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;