Use node-inspector to debug hubot!
sudo npm install -g node-inspector
coffee --nodejs --debug $(which hubot)
| # Install ARCH Linux with encrypted file-system and UEFI | |
| # The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description. | |
| # Download the archiso image from https://www.archlinux.org/ | |
| # Copy to a usb-drive | |
| dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux | |
| # Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration. | |
| # Set swedish keymap |
| if (Meteor.is_client) { | |
| var userName = "PatelNachiket"; | |
| Template.hello.greeting = function () { | |
| return "Fetch recent tweets from Twitter stream of user : " ; | |
| }; | |
| Template.hello.events = { | |
| 'click #fetchButton' : function () { | |
| console.log("Recent tweets from stream!"); | |
| $('#fetchButton').attr('disabled','true').val('loading...'); |
Use node-inspector to debug hubot!
sudo npm install -g node-inspector
coffee --nodejs --debug $(which hubot)
| #!/bin/bash | |
| COOKIE_JAR="ab-cookie-jar" | |
| COOKIE_NAME="_myapp_session" | |
| USERNAME="[email protected]" | |
| PASSWORD="password" | |
| LOGIN_PAGE_URI="http://localhost:3000/users/sign_in" | |
| TEST_PAGE_URI="http://localhost:3000/dashboard" | |
| echo "Logging in and storing session id." |
| #! /bin/sh | |
| # ------------------------------------------------------------------------------ | |
| # SOME INFOS : fairly standard (debian) init script. | |
| # Note that node doesn't create a PID file (hence --make-pidfile) | |
| # has to be run in the background (hence --background) | |
| # and NOT as root (hence --chuid) | |
| # | |
| # MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit | |
| # INIT-INFO RULES http://wiki.debian.org/LSBInitScripts | |
| # INSTALL/REMOVE http://www.debian-administration.org/articles/28 |
| # autoload concerns | |
| module YourApp | |
| class Application < Rails::Application | |
| config.autoload_paths += %W( | |
| #{config.root}/app/controllers/concerns | |
| #{config.root}/app/models/concerns | |
| ) | |
| end | |
| end |
| #!/bin/sh | |
| # Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
| # CREATE block and create them in separate commands _after_ all the INSERTs. | |
| # Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
| # The mysqldump file is traversed only once. | |
| # Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
| # Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
| require 'oauth_util.rb' | |
| require 'net/http' | |
| o = OauthUtil.new | |
| o.consumer_key = 'examplek9SGJUTUpocjZ5QjBJmQ9WVdrOVVFNHdSR2x1TkhFbWNHbzlNQS0tJnM9Y29uc3VtkZXJzZWNyZXQmeD0yYg--'; | |
| o.consumer_secret = 'exampled88d4109c63e778dsadcdd5c1875814977'; | |
| url = 'http://query.yahooapis.com/v1/yql?q=select%20*%20from%20social.updates.search%20where%20query%3D%22search%20terms%22&diagnostics=true'; |