This file contains hidden or 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
| my $app = sub { | |
| my ($status) = 200; | |
| my ($headers) = [ 'Content-type' => 'text/plain' ]; | |
| my ($body) = [ "SUP YOU GUYS\n", "IT'S MEEEEEEE\n" ]; | |
| return [$status, $headers, $body]; | |
| }; | |
| use Plack::Builder; | |
| builder { $app } |
This file contains hidden or 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
| package PLModel::Accessor; | |
| use warnings; | |
| use strict; | |
| sub TIESCALAR { | |
| my ($class) = shift; | |
| my ($curval, $colname, $object) = @_; | |
| return bless({ |
This file contains hidden or 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
| CREATE TABLE users ( | |
| phone_number TEXT | |
| UNIQUE | |
| NOT NULL, | |
| first_name TEXT, | |
| last_name TEXT, | |
| username TEXT | |
| NOT NULL, | |
| PRIMARY KEY (phone_number) |
This file contains hidden or 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 | |
| class Model { | |
| /* public Model->load(Integer) | |
| * returns $this | |
| * | |
| * Pulls data from the database for a given model into the object. Note | |
| * that this clears any state (modifications/etc.) that have been set | |
| * on the object first, for any Model-controlled columns. |
This file contains hidden or 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
| class Range | |
| def overlaps(range) | |
| Sequel::SQL::PlaceholderLiteralString.new( | |
| "(?, ?) OVERLAPS (?, ?)", | |
| [ | |
| self.first, self.end, | |
| range.first, range.end | |
| ], | |
| true | |
| ) |
This file contains hidden or 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
| class git { | |
| package { 'git': | |
| ensure => installed, | |
| } | |
| define repository($project = $name, $cwd, $dir = "$cwd/${project}", | |
| $repo = "githost:${project}.git", $no_ensure = 0) { | |
| $require = $no_ensure ? { | |
| 1 => [Package['git']], | |
| default => [Package['git'], File[$cwd]], |
This file contains hidden or 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, |
This file contains hidden or 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 hidden or 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 hidden or 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 |