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
| ++++ Statistics | |
| Transfer started on : Mon Aug 12 18:14:40 2013 | |
| Transfer ended on : Mon Aug 12 18:20:19 2013 | |
| Transfer time : 338.7 sec | |
| Messages transferred : 543 | |
| Messages skipped : 0 | |
| Messages found duplicate on host1 : 0 | |
| Messages found duplicate on host2 : 0 | |
| Messages void (noheader) on host1 : 0 | |
| Messages void (noheader) on host2 : 0 |
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
| app.get( | |
| '/secure', | |
| //What middleware to use here to see if I've already authenticated? | |
| passport.authorize('ldap', { failureFlash: true }), | |
| function(req, res){ | |
| res.render('index', { | |
| pageTitle:'something here', | |
| body:'cows mooooo' | |
| }); | |
| } |
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
| module.exports = function(module){ | |
| try{ | |
| delete require.cache[require.resolve(module)]; | |
| } | |
| catch(err){ | |
| console.log(err); | |
| } | |
| //console.log(require.cache); | |
| return require(module); | |
| }; |
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
| :hierarchy: | |
| - 'fqdn/%{fqdn}' | |
| - 'modules/%{module_name}' | |
| - 'global' | |
| :logger: 'console' | |
| :yaml: | |
| :datadir: '/var/lib/hiera' | |
| :backends: | |
| - 'file' | |
| - 'yaml' |
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
| upstream node_daemon { | |
| server 127.0.0.1:8080; | |
| } | |
| server { | |
| listen 80; | |
| server_name realhost; | |
| location / { | |
| proxy_pass http://node_daemon; |
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
| $cert_path = $::osfamily ? { | |
| 'RedHat' => '/etc/pki/tls/certs/cas.pem', | |
| default => fail("osfamily ${osfamily} not supported"), | |
| } |
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
| root@scootaloo:/var/log# cat auth.log | cut -b -6 | sort | uniq -c | |
| 4631 Mar 10 | |
| 2097 Mar 11 | |
| 2780 Mar 12 | |
| 1584 Mar 13 | |
| 2520 Mar 14 | |
| 3782 Mar 9 |
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
| # Currently the pattern used when implementing a params class is something like this. | |
| # It works but is very verbose for what it does. | |
| class puppet::params{ | |
| # In this case we are only specializing based on one parameter | |
| case $::osfamily { | |
| 'Debian': { | |
| $conf_file_path = '/etc/puppet/puppet.conf' | |
| } | |
| default: { |
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
| create or replace function subnet_hosts(subnet cidr) returns setof inet as $$ | |
| declare | |
| host inet := (inet (host(network(subnet)))); | |
| broadcast inet := (inet (host(broadcast(subnet)))); | |
| begin | |
| if family(subnet) = 4 then | |
| -- /32's are a special case | |
| if masklen(subnet) = 32 then | |
| return next subnet; | |
| return; |
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
| #include <stdio.h> | |
| #include <stdint.h> | |
| int main(int argc, char** argv){ | |
| char cow2[5][4]; | |
| cow2[3][4] = 10; | |
| cow2[0][0] = 1; | |
| cow2[0][1] = 2; | |
| printf("moo:%i\n", *((char*) cow2+(4*3+4))); | |
| return 0; | |
| } |