Skip to content

Instantly share code, notes, and snippets.

Ricky Saltzer rickysaltzer

Block or report user

Report or block rickysaltzer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View README.md

First working version of the whitelist plugin. Had to modify oxmin.lua to support the passing of a plugin's context. You will need both the plugins in this gist.

Commands:

/whitelist [steamid]
/blacklist [steamid]

You must have canwhitelist and canblacklist flags (using the oxmin giveflag command) to run these commands. The steamid supplied can be either regular (i.e. STEAM_0:1:16556317) or steamid64 (i.e. 76561197993378363).

@rickysaltzer
rickysaltzer / lua_split.lua
Created Jan 8, 2014
Found on the internet, saving for later
View lua_split.lua
-- Generic split function found on the internet
-- http://coronalabs.com/blog/2013/04/16/lua-string-magic/
function string:split( inSplitPattern, outResults )
if not outResults then
outResults = { }
end
local theStart = 1
local theSplitStart, theSplitEnd = string.find( self, inSplitPattern, theStart )
while theSplitStart do
table.insert( outResults, string.sub( self, theStart, theSplitStart-1 ) )
@rickysaltzer
rickysaltzer / steamid.lua
Last active Jan 2, 2016
Convert SteamID to CommunityID. Shamelessly cobbled together from various pieces on the internet.
View steamid.lua
local STEAMID = arg[1]
-- Generic split function found on the internet
-- http://coronalabs.com/blog/2013/04/16/lua-string-magic/
function string:split( inSplitPattern, outResults )
if not outResults then
outResults = { }
end
local theStart = 1
local theSplitStart, theSplitEnd = string.find( self, inSplitPattern, theStart )
@rickysaltzer
rickysaltzer / OxideWhitelistPlugin.lua
Last active Jan 2, 2016
Oxide Rust plugin for a server whitelist. Has not been tested, may crash.
View OxideWhitelistPlugin.lua
PLUGIN.Title = "User Whitelist"
PLUGIN.Description = "Allows admin to grant access to specific users"
PLUGIN.Author = "Monstrado"
function PLUGIN:Init()
self.ServerWhitelistDataFile = datafile("server_whitelist")
self:RefreshWhitelist()
self:AddChatCommand("whitelist", self.cmdWhitelist)
self:AddChatCommand("blacklist", self.cmdBlacklist)
end
View gist:4542457
Error: call to URL https://na14.salesforce.com/services/data/v20.0/query?q=SELECT+Name%2C+Id+from+Lead+WHERE+Id+%3D+%2700Qd000000ErOKwEAN%27 failed with status 403, response [{"message":"TotalRequests Limit exceeded.","errorCode":"REQUEST_LIMIT_EXCEEDED"}], curl_error , curl_errno 0
View gist:3351508
import random
some_cards = ["9 of hearts", "10 of diamonds", "5 of clubs", "king of spades", "king of clubs", "ace of spades"]
some_other_cards = ["9 of hearts", "10 of diamonds", "5 of clubs", "king of spades", "king of clubs", "ace of spades"]
new_cards = []
fancy_cards = []
for i in range(0,len(some_cards)-1):
new_cards.append(some_cards.pop(random.randint(0,len(some_cards)-1)))
print("New Cards:")
print(new_cards)
@rickysaltzer
rickysaltzer / core.clj
Created Aug 8, 2012
random state and words generator
View core.clj
(ns honeycomb.core
(:gen-class)
(:require [clojure.string :as string]))
; Reads a file into an array (split by newline / \n)
(defn file->array
[filename]
(string/split-lines (slurp filename)))
; Some definitions of random arrays of STUFF
View jsftp_problem.js
var Ftp = require('jsftp');
var fs = require('fs');
var user = "user";
var pass = "pass";
var dd_ftp = function(uploader) {
this.uploader = uploader;
this.ftp = new Ftp({
@rickysaltzer
rickysaltzer / redis_forum.py
Created Jan 3, 2012
Redis database object test, making a forum post with replies.
View redis_forum.py
import redis
import json
from juggernaut import Juggernaut
r = redis.StrictRedis()
jug = Juggernaut()
def publish_reply(fn):
def wrapper(*args, **kwargs):
You can’t perform that action at this time.