Skip to content

Instantly share code, notes, and snippets.

View sk89q's full-sized avatar
👋

Albert Pham sk89q

👋
View GitHub Profile
@sk89q
sk89q / 0_reuse_code.js
Created November 13, 2016 23:04
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@sk89q
sk89q / index.html
Created October 20, 2014 06:02
Deduplicate Spotify tracks
<!DOCTYPE html>
<html>
<head>
<title>Deduplicate Spotify tracks based on track artist and title</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<style>
body {
padding: 40px;
}
#input {
@sk89q
sk89q / chat.css
Created November 27, 2013 22:37
Compact Steam web chat
.chat_page_header {
display: none;
}
#chat_friendslist_area {
position: fixed;
top: 0;
left: 0;
bottom: 0;
}
@sk89q
sk89q / lastfm_scrobbles_to_spotify.py
Created October 26, 2013 19:44
Fetches the recent tracks of a last.fm user within a date range and converts it to a list of Spotify URLs (to be copied directly into the Spotify program) sorted descending by play count
#!/usr/bin/env python2.7
import requests
import datetime
import calendar
import time
import json
from pprint import pprint
@sk89q
sk89q / ContextualLogo.php
Created May 11, 2013 04:28
Extensions from wiki.sk89q.com
<?php
if (!defined('MEDIAWIKI')) {
exit(1);
}
$wgExtensionCredits['other'][] = array(
"name" => "ContextualLogo",
"author" => "sk89q",
"version" => '0.1.0',
"url" => "http://www.sk89q.com",
--[[
Node Panel Display
by sk89q
]]--
dofile("npanel_conf.lua")
dofile("serpent.lua")
dofile("util.lua")
local function validateColor(allowNone)
@sk89q
sk89q / remreq.lua
Created March 5, 2013 05:35
Request system we used that let you put what you wanted in a book, and then it would supply your ender pouch with the items
--[[
Remote Request
by sk89q
]]--
function periph(side)
while true do
local p = peripheral.wrap(side)
if p then return p end
os.sleep(1)
body {
overflow: hidden;
}
#chat_friendslist_area {
position: fixed;
top: 0;
left: 0;
bottom: 0;
width: 180px;
<package version="1.1">
<filegroup source="http://example.com/path/to/folder/with/files/" dest=".">
<archive size="SIZE_IN_BYTES">THE_ZIP_NAME.zip</archive>
</filegroup>
<filegroup source="http://s3.amazonaws.com/MinecraftDownload/" dest="bin" verify="md5">
<file size="738345">lwjgl.jar</file>
<file size="227833">jinput.jar</file>
<file size="138318">lwjgl_util.jar</file>
</filegroup>
<filegroup source="http://s3.amazonaws.com/MinecraftDownload/" dest="bin/natives" verify="md5">
// Available under GPLv3
package com.sk89q.skcraft;
import java.util.Random;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.command.CommandSender;