Skip to content

Instantly share code, notes, and snippets.

View jjn1056's full-sized avatar

John Napiorkowski jjn1056

View GitHub Profile
root@ip-172-31-48-121:/home/jjn# service retreatcenter stop
root@ip-172-31-48-121:/home/jjn# service retreatcenter status
● retreatcenter.service
Loaded: loaded (/etc/init.d/retreatcenter; generated)
Active: inactive (dead) since Fri 2018-10-12 06:12:56 PDT; 9min ago
Docs: man:systemd-sysv-generator(8)
CGroup: /system.slice/retreatcenter.service
├─1467 perl-fcgi-pm [RetreatCenter]
└─1469 perl-fcgi
@jjn1056
jjn1056 / gist:e0bbaf0ced60847ef2e39076f757386f
Created October 12, 2018 13:21
/etc/init.d/retreatcenter
#!/var/www/perl5.26.2/bin/perl
use warnings;
use strict;
use lib '/var/www/cpan-lib/lib/perl5';
use Daemon::Control;
my $app_home = '/var/www/src';
my $name = 'retreatcenter';
my $perl = '/var/www/cpan-lib/bin/localenv /var/www/perl5.26.2/bin/perl';
renderRow(data) {
return (
<Text>{`\u2022 ${data}`}</Text>
);
}
render() {
const { productDataLoaded } = this.state;
if (productDataLoaded === false) {
package Backsite::Controller::Backblog;
use Moose;
use MooseX::MethodAttributes;
use MooseX::Types::Moose qw(Int Str);
use MooseX::Types::UUID qw(UUID);
use DateTime::Format::HTTP;
use DateTime;
extends 'Catalyst::Controller';
@jjn1056
jjn1056 / SQLTagging.pm
Created July 25, 2018 12:39
evil plugin
package Adama::Plugin::SQLTagging;
use Moo::Role;
require DBI;
require DBD::Pg;
require Class::Method::Modifiers;
# Ok so this only 'works' when using a blocking / forking server. Even
# then I wonder about it but we seem to get away with it. This is probably
mm-mac-3273:regops jnapiorkowski$ vagrant up
Bringing machine 'virtualbox' up with 'virtualbox' provider...
==> virtualbox: Box 'reg/application_node' could not be found. Attempting to find and install...
virtualbox: Box Provider: virtualbox
virtualbox: Box Version: >= 0
==> virtualbox: Box file was not detected as metadata. Adding it directly...
==> virtualbox: Adding box 'reg/application_node' (v0) for provider: virtualbox
virtualbox: Unpacking necessary files from: file:///Users/jnapiorkowski/Desktop/regops/packer/reg_vagrant_virtualboxubuntu_18.04.json
The box failed to unpackage properly. Please verify that the box
file you're trying to add is not corrupted and that enough disk space
## Current
sub new_transaction($self, $c) : POST At('/transactions/new') {
my $form = $c->model('Form::Transaction');
if($form->validated) {
if(my $result = $c->model('Blockchain')->submit_transaction(%{$form->fif})) {
return $c->view('TransactionAdded', transaction_result=>$result)->http_201;
} else {
return $c->view('InvalidTransaction')->http_406;
}
} else {
<% view 'master',
title=>'Hello',
scripts=>['builder.js'],
content=>begin %>
<p>
<% form, content=>begin %>
<$ end %>
</p>
<% end>
package MyApp::UI::Components::Hello;
use Moo;
extends 'Template::Lace2::Component';
sub items {
return [
{name=>'John', age=>25},
{name=>'Jane', age=>35},
package MyApp::UI::Components::Hello;
use Moo;
extends 'Template::Lace2::Component';
sub items {
return [
{name=>'John', age=>25},
{name=>'Jane', age=>35},