Skip to content

Instantly share code, notes, and snippets.

View pmorch's full-sized avatar

Peter Valdemar Mørch pmorch

View GitHub Profile

Now I've just spent 2 days using DataTables in my AngularJS project.

For me, the important part of the DataTables / AngularJS integration is being able to do it "the angular way". Which means, that the $scope has all the data, but just the data, and the presentation lies in the templates that create the DOM.

To give an idea, here is what the final result looks like: Imgur So in each table cell, there are all kinds of markup. For now, lets pretend it is a <ul> with <li>s containing links just for the sake of argument.

Because I'm using the

@pmorch
pmorch / developement_jessie_fail.log
Created November 20, 2014 15:01
bootstrap-vz: Can't build jessie in either master or development
root@ip-10-0-0-93:~/bootstrap-vz# AWS_ACCESS_KEY=XXXXXXXXXXXXXXXXXXXX AWS_SECRET_KEY=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY ./bootstrap-vz manifests/ec2-ebs-debian-testing-amd64-pvm.manifest.yml
Getting AWS credentials
Adding commands required for formatting
Retrieving instance metadata
Adding locale package to bootstrap installation
Adding commands required for bootstrapping Debian
Creating workspace
Determining required external commands for EC2 bootstrapping
Connecting to EC2
Determining the AMI name
@pmorch
pmorch / manifest.diff
Created November 20, 2014 14:42
bootstrap-vz: Development branch: Inline Credentials - directly in manifest files - don't work
root@ip-10-0-0-195:~/bootstrap-vz# git diff
diff --git a/manifests/ec2-ebs-debian-official-amd64-hvm.manifest.yml b/manifests/ec2-ebs-debian-official-amd64-hvm.manifest.yml
index ed10508..2dd77e9 100644
--- a/manifests/ec2-ebs-debian-official-amd64-hvm.manifest.yml
+++ b/manifests/ec2-ebs-debian-official-amd64-hvm.manifest.yml
@@ -3,8 +3,8 @@ provider:
name: ec2
virtualization: hvm
# credentials:
- # access-key: AFAKEACCESSKEYFORAWS
@pmorch
pmorch / README.txt
Last active August 29, 2015 14:28
nmap seems to sometimes omit results for no apparent reason...
These are the details for a posting to the dev@nmap.org mailing list titled:
"Bug report? nmap seems to sometimes omit results for no apparent reason..."
http://permalink.gmane.org/gmane.comp.security.nmap.devel/28784
@pmorch
pmorch / createTables.sql
Created September 7, 2011 12:03
A large mysql dump for illustrating index problems
CREATE TABLE `IDs` (
`ID` int(11) NOT NULL default '0',
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE `cfgMonitoredTableRows` (
`ID` int(11) NOT NULL,
`nodeID` int(11) NOT NULL default '0',
`monitoredTableID` int(11) NOT NULL default '0',
PRIMARY KEY (`ID`),
KEY `nodeTable` (`nodeID`,`monitoredTableID`),
@pmorch
pmorch / workaround.pl
Last active September 27, 2015 04:18
Workaround for SNMP::Session->new(DestHost=>"bogus") printing to STDERR
my $sess;
my ($tempSTDERR, $STDERRfilename) = File::Temp::tempfile();
open SAVE_STDERR, '>&STDERR';
open STDERR, '>&' . fileno($tempSTDERR);
# If SNMP::Session->new() is going to die for whatever reason, make sure we
# restore STDERR first!
eval {
@pmorch
pmorch / README.md
Created October 12, 2011 10:46
Error running make docs in peg-markdown

When I then run make docs, I get an error: LaTeX Error: Cannot determine size of graphic in TextMate-prefs.png (no BoundingBox)

Am I doing something wrong?

To get started, I cloned peg-multimarkdown, ran update_submodules.sh and put LaTeX Support Files in their place at ~/texmf/tex/mmd/. (Can I (please) put them somewhere relative to ./ and set a flag or environment variable, so I don't mess with ~?)

@pmorch
pmorch / README.md
Created October 17, 2011 20:29
Net-SNMP perl interface problem when retry after initial noSuchName

This is supporting formation for this sourceforget bug report:

SNMP Version 1: If I try to SNMP get two OIDs:

  • one of which doesn't exist
  • the other being in numerical .1.3.6.1.4.1.123456.1 format

like this:

@pmorch
pmorch / README.md
Created October 18, 2011 06:45
hptelnet.escape: A log of the output of a telnet session to a piece of HP network equipment

This a log of the output of telnet-ing to a piece of HP network equipment.

In How to display ANSI Escape codes e.g. from tshark telnet trace? I ask how one views this output in a meaningful way. No answers yet ;-)

I also notice, that if I:

> cat hptelnet.escape

My Linux gnome-terminal or xterm gets smashed in a simlar way. Type a very long command (more than one line, and see that the second line doesn't wrap down to the next line, but "stays in the current line". Which makes it impossible to edit prior commands or use the terminal for anything longer than one line. reset doesn't work. I have to close the terminal and start a new one. :-(

@pmorch
pmorch / README.md
Created November 15, 2011 08:37
Ubuntu kernel config files for problem with pppd