This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Sequel | |
class Database | |
alias :old_synchronize synchronize | |
def synchronize(server=nil, &block) | |
ret = nil | |
old_synchronize(server) do |connection| | |
connection.exec("SET search_path = #{Coleoptera::SSP}") | |
ret = block.call(connection) | |
connection.exec("RESET ALL") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* FUNCTION coleoptera.find_or_create_instructions( | |
* TEXT[] -- instruction labels | |
* ) | |
* RETURNS coleoptera.instructions[] | |
*/ | |
-- as plpgsql | |
CREATE OR REPLACE | |
FUNCTION coleoptera.find_or_create_instructions(IN TEXT[], OUT coleoptera.instructions[]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
#### | |
# this script is not safe. | |
# don't expect it to sanitize your input; it doesn't. | |
# so don't use it on a web server or anywhere else someone untrusted can access | |
# it. | |
# it was designed to work on Linux Mint. | |
# it requires sqlite3 to be installed, and is invoked from the command line. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once '.include/include.php'; | |
class Capacity extends Selector | |
{ | |
private $type; | |
private $capacity; | |
private $cost; | |
function Capacity($capacity, $type, $cost, $photo) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def add_user_access(user, *flags_to_add) | |
# normalize arguments into a form we'll recognize | |
flags_to_add.collect! { |flag| flag.to_sym } | |
id = user.to_i | |
# backup our arguments in case we need to restore to them later | |
flags = user_flags(id) | |
flags_backup = flags.dup | |
flag_lookup_backup = {} | |
flags_to_add.each do |flag| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
int main(int argc, char **argv) { | |
char crash[16]; | |
char* plz = "this is probably longer than 16 characters"; | |
strcpy(crash, plz); | |
return 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Database | |
class Account | |
one_to_many :chanserv_channel_founders, | |
:class_name => Database::ChanServ::Channel, | |
:foreign_key => :founder_id | |
one_to_many :chanserv_channel_successors, | |
:class_name => Database::ChanServ::Channel, | |
:foreign_key => :successor_id | |
one_to_many :chanserv_privileges, | |
:class_name => Database::ChanServ::Privilege |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Sequel | |
class Model | |
STRIP_UNSAFE_VAR_NAMES = /[^a-z_]/i | |
######### | |
protected | |
######### | |
# | |
# Asserts that arguments match a certain class, and raises errors if |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# line 37 in llm/view/dialog/library/abstract.py | |
self.type = wx.ComboBox(panel, | |
-1, | |
choices=["CD/DVD/Blu-Ray", "Book/Magazine"], | |
style=wx.CB_READONLY) | |
sbs.Add(self.build_line(wx.StaticText(panel, -1, "Type:"), self.type)) | |
# new line 51 in llm/view/dialog/library/abstract.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use warnings; | |
use strict; | |
use Scribe; | |
my ($logger) = Scribe->new( | |
minlog => Scribe::DEBUG6, |
OlderNewer