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
| amqp = require('amqp'); | |
| connection = amqp.createConnection { host: 'localhost' } | |
| # Wait for connection to become established. | |
| connection.on 'ready', ()-> | |
| exchange = connection.exchange 'phil-exchange' | |
| # Create a queue and bind to all messages. | |
| connection.queue 'phil-queue',{autoDelete:false,durable:true}, (q)-> | |
| # Catch all messages |
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
| amqp = require 'amqp' | |
| connection = amqp.createConnection { host: 'localhost' } | |
| # Wait for connection to become established. | |
| connection.on 'ready', ()-> | |
| exchange = connection.exchange 'phil-exchange' | |
| exchange.publish '#',"hello" |
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
| server { | |
| listen 8880; | |
| root /var/www; | |
| index index.html index.htm; | |
| server_name localhost; | |
| location / { |
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 | |
| # setup local | |
| BIND_ADAPTER="en0" | |
| LOCAL_PORT=4000 | |
| # setup remote | |
| REMOTE_USER="user" | |
| REMOTE_HOST="server.example.com" | |
| REMOTE_PORT=9999 |
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
| git --no-pager diff --stat --color master..development |
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
| Find: col-lg-(\w)+ | |
| Replace col-lg-$1 col-md-$1 col-sm-$1 col-xs-$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
| NEW_MAC_ADDRESS=$(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//') | |
| echo Mac changed to $NEW_MAC_ADDRESS | |
| sudo ifconfig en0 ether $NEW_MAC_ADDRESS | |
| ifconfig en0 |grep ether |
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
| pbcopy < ~/.ssh/id_rsa.pub |
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
| .PHONY: save save_config save_commands save_scripts | |
| save: | |
| make -j save_config save_commands save_scripts | |
| save_config: | |
| ssh 192.168.1.1 "/opt/vyatta/bin/vyatta-op-cmd-wrapper show configuration" 2> /dev/null > config.txt | |
| save_commands: | |
| ssh 192.168.1.1 "/opt/vyatta/bin/vyatta-op-cmd-wrapper show configuration commands" 2> /dev/null > commands.txt |
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
| task non_digested: :environment do | |
| assets = Dir.glob(File.join(Rails.root, 'public/assets/**/*')) | |
| regex = /(-{1}[a-z0-9]{32}*\.{1}){1}/ | |
| assets.each do |file| | |
| next if File.directory?(file) || file !~ regex | |
| source = file.split('/') | |
| source.push(source.pop.gsub(regex, '.')) | |
| non_digested = File.join(source) |
OlderNewer