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
| public function generateString ($length = 8) { | |
| string = ""; | |
| $possible = "012346789abcdfghjkmnpqrtvwxyzABCDFGHJKLMNPQRTVWXYZ"; | |
| $maxlength = strlen($possible); | |
| if ($length > $maxlength) { | |
| $length = $maxlength; | |
| } | |
| $i = 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
| $(document).ready(function() { | |
| $("#txtboxToFilter").keydown(function(event) { | |
| // Allow: backspace, delete, tab, escape, and enter | |
| if ( event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 27 || event.keyCode == 13 || | |
| // Allow: Ctrl+A | |
| (event.keyCode == 65 && event.ctrlKey === true) || | |
| // Allow: home, end, left, right | |
| (event.keyCode >= 35 && event.keyCode <= 39)) { | |
| // let it happen, don't do anything | |
| 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
| #!/usr/bin/env ruby | |
| puts "If the world is round..." | |
| STDOUT.flush | |
| str = gets.chomp.split('+') | |
| first = str.first.strip | |
| second = str.last.strip | |
| def get_result(num) |
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
| <head> | |
| <title>newapp</title> | |
| </head> | |
| <body> | |
| <h1>Welcome to Meteor!</h1> | |
| {{> hello}} | |
| </body> |
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
| if (Meteor.isClient) { | |
| // counter starts at 0 | |
| Session.setDefault("counter", 0); | |
| Template.hello.helpers({ | |
| counter: function () { | |
| return Session.get("counter"); | |
| }, | |
| users: [ | |
| {name: 'Jack', age: 25}, {name: 'James', age: 23}, {name: 'Matt', age: 21} |
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
| $ curl https://install.meteor.com | /bin/sh | |
| $ meteor create newapp | |
| $ cd newapp | |
| $ meteor //Start the Meteor server on port 3000 |
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
| <head> | |
| <title>newapp</title> | |
| </head> | |
| <body> | |
| <h1>Welcome to Meteor!</h1> | |
| {{> hello}} | |
| </body> |
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
| if (Meteor.isClient) { | |
| // counter starts at 0 | |
| Session.setDefault("counter", 0); | |
| Template.hello.helpers({ | |
| counter: function () { | |
| return Session.get("counter"); | |
| } | |
| }); |
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
| execute pathogen#infect() | |
| filetype plugin on | |
| filetype indent on | |
| let mapleader="," | |
| colorscheme monokai | |
| set background=dark | |
| set clipboard=unnamed |
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
| $ meteor create lowershelf | |
| $ cd lowershelf | |
| $ meteor add mizzao:bootstrap-3 | |
| $ meteor add accounts-password | |
| $ meteor add ian:accounts-ui-bootstrap-3 |
OlderNewer