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
#!/bin/bash | |
INTERFACES="enp3s0 enp4s0 brmn001" | |
TS="`date +%Y%m%dT%H%M%S`" | |
trap interrupted_tshark SIGINT SIGTERM | |
PIDS="" | |
PCAPFILES="" |
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
#!/bin/bash | |
(((apt-get update && apt-get -y -q upgrade) 2>&1 | logger -t aptuu -p user.info); logger -t aptuu -p user.info "*** aptuu Completed. ***") & | |
tail -f /var/log/syslog |
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
package com.example; | |
import java.io.*; | |
public class DeepCopy { | |
private Class<?> clazz; | |
private byte[] byteData; | |
public <T> DeepCopy(T t) { | |
saveObject(t); |
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
const x = { One:1, Zero:0, False:false, True:true, Undefined:undefined, Null:null, StringTrue:'true', StringFalse:'false', StringUndefined:'undefined', StringNull:'null' }; | |
console.log(x); | |
console.log('\n---------------------------------------------------------------------------\n'); | |
for (let i in x) { console.log(i + ':' + x[i] + ':' + (x[i] ? 'true' : 'false')) } | |
// { One: 1, | |
// Zero: 0, | |
// False: false, | |
// True: true, | |
// Undefined: undefined, |
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
// THE REFACTORED SERVICE TEST | |
import {ActivityTypeService} from './activity-type.service'; | |
import {UrlService} from '..'; | |
import {httpGetSpecDefinitions} from '../base/service-test-base'; | |
const TEST_VALUE: Array<object> = [{x: 'obj1'}, {x: 'obj2'}]; | |
describe('ActivityTypeService', | |
httpGetSpecDefinitions((spy) => new ActivityTypeService(spy, new UrlService()), TEST_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
import { fromEvent, interval } from 'rxjs'; | |
import { delayWhen, map, tap, scan, debounce } from 'rxjs/operators'; | |
let queued: number = 0; | |
let completed: number = 0; | |
const start = Date.now(); | |
const clicks = fromEvent(document, 'click'); | |
function tf(): number { return Date.now() - start }; |