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 name = "Anthony"; | |
| var str = "Hello my name is Anthony"; | |
| if (str.indexOf(name) > -1) { | |
| console.log("It contains my name!"); | |
| } else { | |
| console.log("It doesn't."); | |
| } | |
| // would print "It contains my name!" |
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
| package main | |
| import ( | |
| "gopkg.in/yaml.v2" | |
| "io/ioutil" | |
| "log" | |
| ) | |
| func main() { | |
| bot := &Bot{} |
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
| <?php | |
| namespace Hello; | |
| function hello() { | |
| echo "Hello World.\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
| package main | |
| import ( | |
| "os/exec" | |
| ) | |
| func main() { | |
| err := exec.Command("goimports", "a.go", ">>", "b.go").Run() | |
| if err != nil { | |
| panic(err) |
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
| package main | |
| import ( | |
| "fmt" | |
| "os/exec" | |
| ) | |
| func main() { | |
| err := exec.Command("python").Run() | |
| if err != nil { |
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
| function addUserList(e,s){Object.keys(e).forEach(function(n){var a=e[n],t=md5(n).substr(0,6),c="<p class='user'>"+a+" <span style='color:#"+t+";'>"+n+"</p>";"&"===a&&(s===current_channel&&$("#user_list").append(c),void 0===users.get(s)&&users.set(s,[]),users.get(s).push(c))}),Object.keys(e).forEach(function(n){var a=e[n],t=md5(n).substr(0,6),c="<p class='user'>"+a+" <span style='color:#"+t+";'>"+n+"</p>";"@"===a&&(s===current_channel&&$("#user_list").append(c),void 0===users.get(s)&&users.set(s,[]),users.get(s).push(c))}),Object.keys(e).forEach(function(n){var a=e[n],t=md5(n).substr(0,6),c="<p class='user'>"+a+" <span style='color:#"+t+";'>"+n+"</p>";"+"===a&&(s===current_channel&&$("#user_list").append(c),void 0===users.get(s)&&users.set(s,[]),users.get(s).push(c))}),Object.keys(e).forEach(function(n){var a=e[n],t=md5(n).substr(0,6),c="<p class='user'>"+a+" <span style='color:#"+t+";'>"+n+"</p>";""===a.trim()&&(s===current_channel&&$("#user_list").append(c),void 0===users.get(s)&&users.set(s,[]),users.get(s) |
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 never = true; | |
| var Never = function() {}; | |
| Never.prototype.giveYouUp = "Never gonna give you up."; | |
| Never.prototype.letYouDown = "Never gonna let you down."; | |
| while(never) { | |
| var rick = new Never(); |
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
| module ChatHelpers | |
| end |
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 TechCode={};TechCode.prototype.askQuestion=function(e){switch(e){case/ps (bot|server|client)/:return"If you need help modifying, running, or setting up a server, bot, or client, you probably shouldn't be running one.";case"question":return"Don't ask to ask. Ask your question and if someone can help they'll answer.";case"learn":return["https://codecademy.com","https://stackoverflow.com","https://google.com"];default:return"I can't answer that question."}}; |
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 TechCode = {}; | |
| TechCode.prototype.askQuestion = function(question) { | |
| switch (question) { | |
| case /ps (bot|server|client)/: | |
| return "If you need help modifying, running, or setting up a server, bot, or client, you probably shouldn't be running one."; | |
| break; | |
| case 'question': | |
| return "Don't ask to ask. Ask your question and if someone can help they'll answer."; | |
| break; |