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
| this.plugin = { | |
| 'name': 'echo' | |
| ,'pattern': /^\?echo (.+)$/ | |
| ,'description': 'Repeat a message.' | |
| ,'example': '?echo Hello World.' | |
| ,'action': function(message) { | |
| message.say(message.match_data[1]) | |
| } | |
| ,'url': 'http://gist.github.com/575847' | |
| } |
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
| this.plugin = { | |
| 'name': 'colorize' | |
| ,'pattern': /^\?colorize (.+)$/ | |
| ,'description': 'Randomly colorize the message.' | |
| ,'example': "?colorize I feel funny. Is this real life?" | |
| ,'action': function(message) { | |
| var output = '' | |
| for(i in message.match_data[1]){ | |
| var color_code = (Math.floor(Math.random()*14)+2).toString() //2 to 15 | |
| color_code = '\x03'+((color_code.length<2) ? ('0'+color_code) : color_code) |
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
| this.plugin = { | |
| 'name': 'double' | |
| ,'pattern': /^\?double (.+)$/ | |
| ,'description': 'Print the same message but two times larger by repeating each character once.' | |
| ,'example': "?double Oh my God it's full on!." | |
| ,'action': function(message) { | |
| var output = '' | |
| for(i in message.match_data[1]){ | |
| output += message.match_data[1][i]+message.match_data[1][i] | |
| } |
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
| this.plugin = { | |
| 'name': 'rainbow' | |
| ,'pattern': /^\?rainbow (.+)$/ | |
| ,'description': 'Colorize the message like a rainbow.' | |
| ,'example': "?rainbow What does it mean?" | |
| ,'action': function(message) { | |
| var output = '' | |
| for(i in message.match_data[1]){ | |
| var rainbow_colors = [4, 7, 8, 3, 12, 6] | |
| color_code = rainbow_colors[i % rainbow_colors.length] |
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
| this.plugin = { | |
| 'name': 'upper' | |
| ,'pattern': /^\?upper (.+)$/ | |
| ,'description': 'Uppercase a message.' | |
| ,'example': '?upper consequences will never be the same.' | |
| ,'action': function(message) { | |
| message.say(message.match_data[1].toUpperCase()) | |
| } | |
| ,'url': 'http://gist.github.com/576171' | |
| } |
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 | |
| ln -s $1 $2 | |
| if [ $? -ne 0 ]; then | |
| read -p "Try the inverse?" yn | |
| case $yn in | |
| [Yy]* ) `ln -s $2 $1`; | |
| esac | |
| fi |
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 filas = $({}); | |
| function queueExample(){ | |
| filas.queue('fila1', function(){console.log('1 foo');}); | |
| filas.queue('fila1', function(){console.log('1 bar');}); | |
| filas.queue('fila2', function(){console.log('2 FOO');}); | |
| filas.queue('fila2', function(){console.log('2 BAR');}); | |
| filas.queue('fila2', function(){console.log('foobar');}); | |
| console.log(filas.dequeue('fila1')); //1 foo | |
| console.log(filas.dequeue('fila2')); //2 FOO | |
| console.log(filas.dequeue('fila2')); //2 BAR |
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
| // Scrapping dos comentários de noticias do site www.saocarlosagora.com.br | |
| // codigo do script baseado no exemplo deste blog post de David Trejo | |
| // http://blog.dtrejo.com/scraping-made-easy-with-jquery-and-selectorga | |
| // requisitos do npm: http-agent, jsdom, jquery | |
| //configuracao | |
| var site = "www.saocarlosagora.com.br" | |
| , path = "/policia/noticia/2012/01/09/25766/dig-prende-comerciante-acusado-de-estuprar-jovem-no-santa-felicia/" | |
| , page = "?page=" |
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
| diff --git a/apps/settings/js/wifi.js b/apps/settings/js/wifi.js | |
| index 9ac10b0..2c6a7a0 100644 | |
| --- a/apps/settings/js/wifi.js | |
| +++ b/apps/settings/js/wifi.js | |
| @@ -14,7 +14,7 @@ window.addEventListener('localized', function scanWifiNetworks(evt) { | |
| // current state | |
| function updateState() { | |
| - var currentNetwork = wifiManager.connectedNetwork; | |
| + var currentNetwork = wifiManager.connection.network; |
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
| /* .---. | |
| /o o\ | |
| __(= " =)__ | |
| //\'-=-'/\\ | |
| ) (_ | |
| / `"=-._ | |
| / \ ``"=. | |
| / / \ \ `=..--. | |
| ___/ / \ \___ _, , `\ | |
| `-----' `""""`'-----``"""` \ \_/ |