Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Pavelovich's full-sized avatar

Aleksandr Pavelovich Pavelovich

View GitHub Profile
@Pavelovich
Pavelovich / neckbeard.py
Last active August 29, 2015 14:15
Neckbeard translator
#!/usr/bin/python
# Debug strings, comment out entry prompt to test the program
string = "Hello m'lady, please do not friendzone. I am a really nice guy."
string = "M'Hello m'lady, m'please m'do m'not m'friendzone. M'I m'am m'a m'really m'nice m'guy."
def toNeckbeard(string):
string = "M'"+string
string = string.replace(" "," m'")
string = string.replace("m'm'","m'")
@Pavelovich
Pavelovich / imgur.php
Last active August 24, 2016 19:55
Imgur embedding extension for MediaWiki
<?php
if( !defined( 'MEDIAWIKI' ) ) {
echo( "This is an extension to the MediaWiki package and cannot be run standalone.\n" );
die( -1 );
}
/*
The MIT License (MIT)
/*
* Design by Sasha Pavelovich
* Includes some elements and colors from atom.io
* Except for a few hex color values, this
* stylesheet contains my own work.
*
* Intended as a simple, CSS webpage template
* Available under MIT license, copyright (c) 2014
*
*/
echo "gibson" > /etc/hostname
hostname -F /etc/hostname
cat << EOF >> /etc/hosts
104.237.132.71 gibson.redsec.ru gibson
EOF
apt-get update
apt-get upgrade
#!/usr/bin/python
import requests
from bs4 import BeautifulSoup
import json
import urllib
username = "Lieutenant S. bot"
password = "xxxxxxxx"
#domain = "https://meta.orain.org"
domain = "http://encyclopediamuricana.us"
@Pavelovich
Pavelovich / irc_bot.py
Created August 11, 2014 02:28
Simple IRC bot
#!/usr/bin/python
import socket
import sys
server = "chat.freenode.net"
channel = "#orain"
nick = "Sasha_IRC_bot"
irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print "Connecting to "+ server +"..."
#!/usr/bin/python
from bs4 import BeautifulSoup
import requests
import time
req = requests.get("http://rationalwiki.org/wiki/RationalWiki:Saloon_bar")
res = req.text
res = BeautifulSoup(res)
#sec = req.find_all("h2", 'p')
#!/usr/bin/python
# -*- coding: utf-8 -*-
import requests
import time
import datetime
def saloonBarReq():
reqData = {"action" : "raw"}
reqHeaders = {"User-Agent":"Saloon Bar scanner: Sokolovskaya, Checking Rational Wiki Saloon Bar for evidence of harassment, sokolovskaya.akula.sturmkrieg.ru in Dallas, Texas"}
req = requests.post("http://rationalwiki.org/wiki/RationalWiki:Saloon_bar", data=reqData, headers=reqHeaders)
@Pavelovich
Pavelovich / index.php
Last active August 29, 2015 14:04
Sturmkrieg.ru archive page
<html>
<head>
<title>Archive</title>
</head>
<body style='background: #000000; color: #777777; padding: 30px;'>
<font face="arial,helvetica">
<p><a style='color: #FF0000' href='../'>Return to board</a></p>
@Pavelovich
Pavelovich / object.c
Created August 2, 2014 22:27
An example object I created
#include <stdio.h>
//#include <unistd.h>
#include "lib/stdfn.h"
typedef struct car {
char *color;
char *size;
int year;
} *car_t;