This file contains hidden or 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
nifi1: | |
image: ixortalk/vc.nifi | |
container_name: nifi1 | |
privileged: true | |
user: root | |
expose: | |
- 8080 | |
- 8081 | |
ports: |
This file contains hidden or 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
<dependencies> | |
<dependency> | |
<groupId>com.google.code.gson</groupId> | |
<artifactId>gson</artifactId> | |
<version>2.6.1</version> | |
<scope>compile</scope> | |
</dependency> | |
<dependency> | |
<groupId>com.fasterxml.jackson.core</groupId> | |
<artifactId>jackson-core</artifactId> |
This file contains hidden or 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
var server, | |
express = require('express'), | |
fs = require('fs'), | |
app = express(), | |
Busboy = require('busboy') | |
app.post('/files', function(req, res) { | |
var busboy = new Busboy({ | |
headers: req.headers | |
}); |
This file contains hidden or 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 { Schema, arrayOf, normalize } from 'normalizr'; | |
import { camelizeKeys } from 'humps'; | |
import 'isomorphic-fetch'; | |
// Extracts the next page URL from Github API response. | |
function getNextPageUrl(response) { | |
const link = response.headers.get('link'); | |
if (!link) { | |
return null; | |
} |
This file contains hidden or 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
input { | |
stdin { | |
type => "stdin-type" | |
} | |
filter { | |
json { | |
source => "message" | |
} | |
} |
This file contains hidden or 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
## /etc/collectd/collectd.conf generated for vps3.sparklingclouds.nl by Ansible | |
### Config Type: CollectD Client | |
Hostname $HOSTNAME | |
FQDNLookup false | |
Interval 30 | |
ReadThreads 1 | |
LoadPlugin syslog |
This file contains hidden or 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
#collectd | |
sudo apt-get install collectd | |
sudo vim /etc/collectd/collectd.conf | |
LoadPlugin "write_graphite" | |
<Plugin "write_graphite"> | |
<Carbon> | |
Host "localhost" | |
Port "2003" |
This file contains hidden or 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/sbin/dtrace -s | |
syscall::unlink:entry | |
/copyinstr(arg0) == $$1/ | |
{ | |
printf("%s removed %s using %s at %Y\n", execname, $$1, probefunc, walltimestamp); | |
} | |
syscall::unlinkat:entry | |
/copyinstr(arg1) == $$1/ |
This file contains hidden or 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/sbin/dtrace -s | |
syscall::unlink:entry | |
/copyinstr(arg0) == "foo"/ | |
{ | |
printf("%s removed foo using %s at %Y\n", execname, probefunc, walltimestamp); | |
} | |
syscall::unlinkat:entry | |
/copyinstr(arg1) == "foo"/ |
This file contains hidden or 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
//only functions create new scope | |
//beware of creating closures in a for loop since the scope doesn't change after an iteration of the loop | |
//the solution in such a case might be returning another closure | |
var arr = [] | |
for (var i = 0 ; i < 10 ; i++) { | |
arr[i] = function () { | |
console.log(i) | |
} | |
} |
NewerOlder