Skip to content

Instantly share code, notes, and snippets.

View SenpaiSilver's full-sized avatar
💭
🥓🥓🥓

SenpaiSilver

💭
🥓🥓🥓
View GitHub Profile
@SenpaiSilver
SenpaiSilver / pso2online.py
Created July 4, 2014 23:11
Check the ship status.
#! /usr/bin/python3
import socket
import time
import json
SERVERS = {
"Ship01": ["gs001.pso2gs.net", 12100],
"Ship02": ["gs016.pso2gs.net", 12200],
"Ship03": ["gs031.pso2gs.net", 12300],
[
{
"PartyName": "Tea Party",
"MaxPlayers": 6,
"Players": [
0,
15,
7
],
"GameMaster": 8
#!/bin/sh
wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains pso2.jp --no-parent "http://pso2.jp/players/update/$1/"
for i in `seq -f "%02g" 1 10`
do
wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains pso2.jp --no-parent "http://pso2.jp/players/update/$1/$i/"
done
@SenpaiSilver
SenpaiSilver / pussy
Last active August 29, 2015 14:09
There is a dick API but no pussy API: http://dicks-api.herokuapp.com/
# -*- coding: utf-8 -*-
from flask import Flask
import json
import random
import ast
PUSSY = ["😺", "😸", "😻", "😽", "😼", "🙀", "😿", "😹", "😾"]
app = Flask(__name__)
#!/bin/sh
for i in *
do
echo -e "data/win32/${i}\t$(wc -c ${i} | cut -d ' ' -f 1)\t$(md5sum ${i} | cut -d ' ' -f 3 | tr '[:lower:]' '[:upper:]')"
done
# No goats were harmed in the making of this voodoo script
<?php
/*
** SenpaiSilver
**
** https://gist.github.com/SenpaiSilver
*/
define("SQL_USR", "root");
define("SQL_PSSWD", "");
define("SQL_DB", "test");
<?php
function __autoload($classname)
{
$filename = str_replace("..", "", "./". $classname .".class.php");
if (file_exists($filename))
include_once($filename);
}
?>
<!DOCTYPE HTML>
INSERT INTO `seat` (`seat_id`, `area_id`, `row_no`) VALUES
(1, 3, 'A00'),
(2, 3, 'A01'),
(9, 3, 'A10'),
(10, 3, 'A11'),
(11, 3, 'A12'),
(12, 3, 'A13'),
(13, 3, 'A14'),
(14, 3, 'A15'),
(3, 3, 'A02'),
<?php
/*
** Please get this plugin from the repo:
** https://github.com/SenpaiSilver/ShowMeYourGists
**
** This paste isn't always up to date.
*/
function embedGistsInPosts($post) {
$pat = '/<p>(https?:)\/\/gist.github.com\/(.*)\/(.*)<\/p>/mi';
$sub = '<script src="$1//gist.github.com/$2/$3.js"></script>';
using System;
using System.Collections.Generic;
namespace PlayList
{
[Serializable]
public class PlayList: System.Windows.Controls.ListBox
{
private Dictionary<String, Uri> _files;
public void Add(Uri path)