Skip to content

Instantly share code, notes, and snippets.

View jbearden0's full-sized avatar

James Bearden jbearden0

View GitHub Profile
Successfully built package in './discordwebapp.nontrivial_1.0.0_all.click'.
non-network local connections being added to access control list
Mounting device home to /home/james/.clickable/home
timedatectl: invalid option -- 'p'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-james'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-james'
Failed to create /home/james/.cache for shader cache (Permission denied)---disabling.
QApplication: invalid style override passed, ignoring it.
UCUriHandler: Empty "APP_ID" environment variable, ignoring.
file:///usr/lib/x86_64-linux-gnu/qt5/qml/Morph/Web/MorphWebView.qml:138:5: QML Connections: Cannot assign to non-existent property "onContextMenuIntercepted"
#!/bin/bash
BACKUPTIME="$(date '+%Y%m%dT%H%M%S%z')"
BACKUPLOC=/home/backups
DBDIR=/var/lib/firebird/2.5/data
DBNAME=rsgdata
PASSLOC=/etc/firebird/2.5/SYSDBA.password
LEVEL=${1:-0}
COUNT=8
#!/bin/bash
user=secret
pass=secret
dbfile='/var/lib/firebird/2.5/data/rsgdata.gdb'
dbname=$(mktemp -u)
echo $dbname
echo "Stopping firebird..."
service firebird2.5-super stop
#!/bin/bash
user=secret
pass=secret
dbfile='/var/lib/firebird/2.5/rsgdata.gdb'
dbname=$(mktemp -u)
echo $dbname
echo "Locking database..."
gfix -user $user -password $pass localhost:rsgdata -shut single -force 5
@jbearden0
jbearden0 / gist:6a942c1ad7eb46fc05f0
Created November 13, 2015 17:01
Create Fake Mojolicious Self
sub GetFakeSelf {
my $Permissions = { 1005 => 'VIEWONLY' };
my $Stash = { User => 999, Permissions => $Permissions };
my $Session = { ClientType => 1, OrgName => 'NONE', ID => 999 };
my $Tx = Mojo::Base->new();
my $App = Mojo::Base->new();
my $Log = Mojo::Log->new();
my $Req = Mojo::Log->new();
private static int BUFFER_SIZE = 8 * 1024;
this.wrapSrc = ByteBuffer.allocateDirect(BUFFER_SIZE * 2);
this.wrapDst = ByteBuffer.allocateDirect(BUFFER_SIZE * 2);
this.unwrapSrc = ByteBuffer.allocateDirect(BUFFER_SIZE * 2);
this.unwrapDst = ByteBuffer.allocateDirect(BUFFER_SIZE * 2);
java.lang.IllegalStateException: Buffer overflow in wrap!
at com.twistedmatrix.internet.Reactor$TCPConnection.wrap(Reactor.java:219)
import java.math.BigDecimal;
import java.nio.ByteBuffer;
import java.util.Calendar;
import java.util.TimeZone;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import com.twistedmatrix.amp.*;
@jbearden0
jbearden0 / count_server.py
Last active August 29, 2015 14:09
Example of a simple bidirectional python AMP server
# python count_server.py
from sys import stdout, exit
from decimal import Decimal
from datetime import datetime
from twisted.internet import reactor
from twisted.internet.protocol import Factory
from twisted.internet.endpoints import TCP4ServerEndpoint
from twisted.protocols import amp
from twisted.python.log import startLogging, err, msg
@jbearden0
jbearden0 / count_client.py
Last active August 29, 2015 14:08
Example of a simple bidirectional python AMP client
# python count_client.py
from sys import stdout, exit
from decimal import Decimal
from datetime import datetime
from twisted.internet import reactor
from twisted.internet.protocol import Factory
from twisted.internet.endpoints import TCP4ClientEndpoint
from twisted.protocols import amp
from twisted.python.log import startLogging, err, msg