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 SlackBot = require('slackbots'); | |
| var todos = {} // object to hold the users lits | |
| var userList = []; | |
| var commands = { | |
| echo: function(data){ | |
| return bot.postMessage(data.channel, data.payload, params) | |
| }, | |
| add: function(data){ |
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
| Color_Off='\e[0m' # Text Reset | |
| # Regular Colors | |
| Black='\e[0;30m' # Black | |
| Red='\e[0;31m' # Red | |
| Green='\e[0;32m' # Green | |
| Yellow='\e[0;33m' # Yellow | |
| Blue='\e[0;34m' # Blue | |
| Purple='\e[0;35m' # Purple | |
| Cyan='\e[0;36m' # Cyan |
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
| # Byte-compiled / optimized / DLL files | |
| __pycache__/ | |
| *.py[cod] | |
| # C extensions | |
| *.so | |
| # Distribution / packaging | |
| .Python | |
| env/ |
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
| def post(self, request): | |
| code = request.POST.get('code').replace('"','\\"') | |
| res = subprocess.getoutput("python3 -c \""+ code + "\"") | |
| context = {'code': code, 'res': res} | |
| return render(request, self.template, context) |
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 | |
| wget -O install.sh 'https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda3-2.4.0-Linux-x86_64.sh'; | |
| chmod +x install.sh; | |
| ./install.sh; |
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(){ | |
| window.bbQuery = function(selector){ | |
| //can only select one element by id. Make it able to select ids, classes, and by plain tag name ie. "header" | |
| //and return multiple elements when more than one is selected | |
| //example usage: bbQuery("#lol") - bbQuery(".container") - bbQuery("h1") | |
| // checks to see if there are spaces in the selector, then parse it for multi node matches. | |
| if( /\s/.test(selector) ) return new Element( selectors['multi'](selector) ); | |
| // breaks the selector match from string, then set what kind of match to perform. |
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
| # do this when ever u start working on a git repo | |
| git clone https://github.... | |
| cd <repo name> | |
| git checkout -b amos | |
| # do this when you have work to add | |
| git add --all :/ | |
| git commit -m "what u did here" | |
| git push origin amos |
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
| <VirtualHost *:80> | |
| ServerAdmin [email protected] | |
| # ServerName dev.718it.biz | |
| ServerName dev.718it.biz | |
| DocumentRoot /stuff0/dev | |
| <Directory /> | |
| Options +Indexes +Includes +FollowSymLinks +MultiViews | |
| AllowOverride AuthConfig FileInfo | |
| Require all granted |
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
| @classmethod | |
| def all(cls,*args): | |
| c.execute('SELECT * FROM {}' .format(cls.__name__)) | |
| complete_data = c.fetchall() | |
| column_name = c.description | |
| names_of_columns = [] | |
| for i in range(0,len(column_name)): | |
| col = (column_name[i][0]) | |
| names_of_columns.append(col) | |
| rows = [] |
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
| import sqlite3 | |
| class Model: | |
| def __init__( self, **kwargs ): | |
| for key, value in kwargs.items(): | |
| setattr( self, key, value ) | |
| def __connect(): | |
| conn = sqlite3.connect( 'babyorm.db' ) |