Skip to content

Instantly share code, notes, and snippets.

Esteban fr0gs

Block or report user

Report or block fr0gs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View router.js
//Silly small javascript router to help me learn how they worked in a very simple way
(function (){
const appDiv = "app";
// Both set of different routes and template generation functions
let routes = {};
let templates = {};
View stacktrace.txt
/usr/local/bundle/gems/rdf-raptor-1.99.0/lib/rdf/raptor/ffi/v2/parser.rb:209: [BUG] Segmentation fault at 0x00000000000000
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0064 p:---- s:0324 e:000323 CFUNC :raptor_parser_parse_chunk
c:0063 p:0018 s:0317 E:002558 METHOD /usr/local/bundle/gems/rdf-raptor-1.99.0/lib/rdf/raptor/ffi/v2/parser.rb:209
c:0062 p:0025 s:0313 E:0025a8 RESCUE /usr/local/bundle/gems/rdf-raptor-1.99.0/lib/rdf/raptor/ffi/v2/parser.rb:163
c:0061 p:0056 s:0310 E:000a90 METHOD /usr/local/bundle/gems/rdf-raptor-1.99.0/lib/rdf/raptor/ffi/v2/parser.rb:157
c:0060 p:0175 s:0303 E:000c98 METHOD /usr/local/bundle/gems/rdf-raptor-1.99.0/lib/rdf/raptor/ffi/v2/parser.rb:92
c:0059 p:0018 s:0297 E:001d90 METHOD /usr/local/bundle/gems/rdf-raptor-1.99.0/lib/rdf/raptor/ffi.rb:118
View attachment-file-upload.js
import Ember from 'ember';
import FileField from 'ember-uploader/file-field';
var AttachmentFileUploadComponent;
AttachmentFileUploadComponent = FileField.extend({
multiple: true,
attributeBindings: ["capture", "accept"],
accept: "accept='image//*'",
capture: "camera",
changedFiles:'files', function() {
var files;
files = this.get('files');
if (!Ember.isEmpty(files)) {
this.sendAction('filesChanged', files);
return this.rerender();
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
mappings: undefined,
computedMappings: Ember.computed('mappings', function() {
let mappings = this.get('mappings');
return mappings;
init: function() {
fr0gs / tcptrace-time-to-secs
Last active Aug 29, 2015
Crappy code to read a pcap file with tcptrace and convert elapsed time into seconds
View tcptrace-time-to-secs
TIMEZ=$(tcptrace -l $PCAP 2>/dev/null | awk 'NR==15 {print $3}') # Got a time value like 00:00:
read -a tokenized <<< "${TIMEZ}"
HOUR=( "${tokenized[0]}" )
MIN=( "${tokenized[1]}" )
SEC=( "${tokenized[2]}" ) #To reassign a variable assigned
RES=$(echo "scale = 6; 3600*$HOUR+60*$MIN+$SEC" | bc)
You can’t perform that action at this time.