This file contains 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
collectionsafedropper = function(database,col) { | |
var thedb = db.getSiblingDB(database); | |
var thecoll = thedb[col]; | |
var indexes = thecoll.getIndexes(); | |
print("Dropping: ", database.toString() + "." + col.toString()); | |
thecoll.drop(); | |
indexes.forEach(function(index) { | |
var key = index.key; | |
var options = {}; |
This file contains 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
" An updated vimrc from the unix example. | |
" GistID: ef703ea372a15e36d90c | |
" Maintainer: Pieter Jordaan | |
" Last change: 13 Sept 2020 | |
" | |
" To use it, copy it to | |
" for Unix and OS/2: ~/.vimrc | |
" for Amiga: s:.vimrc | |
" for MS-DOS and Win32: $VIM\_vimrc |
This file contains 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
'use strict'; | |
// Environment variables that grunt will set when the server starts locally. Use for your api keys, secrets, etc. | |
// You will need to set these on the server you deploy to. | |
// | |
// This file should not be tracked by git. | |
module.exports = { | |
SESSION_SECRET: "jericho-secret", | |
FACEBOOK_ID: "app-id", |
This file contains 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
#include <vector> | |
#include <algorithm> | |
#include <iostream> | |
#include <ctime> | |
#include <functional> | |
#define LOG(x) { std::cout << #x << " = " << (x) << "\n"; } | |
#define TIME(t) { std::cout << ((double)(clock() - (t)) / CLOCKS_PER_SEC) << " s\n"; } | |
volatile unsigned long long out = 0; |
This file contains 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/env python3 | |
#GistID: e3db8513a0f3d90b6bdf | |
import binascii | |
import sys | |
def hextoimei(hexstring): | |
hexstring = hexstring.replace(" ", "") | |
hexstring = hexstring.replace("0x", "") | |
hexstring = hexstring.replace("0X", "") |
This file contains 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
// Insert this right after getting the offer (create-offer) | |
// TODO don't override ultimately this will be bad.. | |
gchar* fmtp_value = g_strdup_printf ("96 profile-level-id=%s;packetization-mode=1","42e01f"); | |
GstSDPMedia *sdp_media = | |
(GstSDPMedia *) & g_array_index (offer->sdp->medias, GstSDPMedia, 0); | |
for( int i = 0; i < gst_sdp_media_attributes_len(sdp_media); ++i) { | |
const GstSDPAttribute* attr = gst_sdp_media_get_attribute(sdp_media, i); | |
if(attr->key) | |
cout << attr->key << ":"; | |
if(attr->value) |
This file contains 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
Sub SaveAllAsPDF() | |
Dim strFilename As String | |
Dim strDocName As String | |
Dim strPath As String | |
Dim oDoc As Document | |
Dim fDialog As FileDialog | |
Dim intPos As Integer | |
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker) | |
With fDialog |
This file contains 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
b = []; a = 0; db.snapshots.find({camera: {$in: ["5dfb35f7bd040908dd2bed04", "5df9e2cfbd040908dd2bec92"]}}, {timestamp:1}).sort({_id: 1}).forEach(function(item) {if(-(item._id.getTimestamp()) + item.timestamp > 5*60*1000) {print('WHAAAT: ' + Math.abs(+(item._id.getTimestamp()) - item.timestamp)/1000/60 + ' ' + +(item._id.getTimestamp()) + ' ' + item.timestamp + item._id.getTimestamp()); a++; b.push(item);}}) | |
b.forEach(function(snap){printjson(snap); db.snapshots.updateOne({_id: snap._id},{$set: {timestamp: +(snap._id.getTimestamp())}})}) |
This file contains 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
adb -t 3 shell ps | grep com.jerichosystems.secutraq | awk '{print $2}' | xargs -I{} adb -t 3 logcat -v color --pid={} |
This file contains 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/env python | |
import sys, os, _thread, time, glob, shutil | |
import gi | |
import concurrent.futures | |
gi.require_version('Gst', '1.0') | |
from gi.repository import Gst, GObject, GLib | |
outpath = '/mnt/flash/SecuvueFootage' |
OlderNewer