This file contains 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
App 2091 output: Error during failsafe response: undefined local variable or method `env' for #<ExceptionHandler::ExceptionController:0x000055a292149300> | |
App 2091 output: Did you mean? end | |
App 2091 output: END | |
App 2091 output: /home/ubuntu/OpenDSA-LTI/app/controllers/exception_handler/exception_controller.rb:30:in `status' | |
App 2091 output: /home/ubuntu/OpenDSA-LTI/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.1/lib/active_support/callbacks.rb:428:in `block in make_lambda' | |
App 2091 output: /home/ubuntu/OpenDSA-LTI/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.1/lib/active_support/callbacks.rb:200:in `block (2 levels) in halting' | |
App 2091 output: /home/ubuntu/OpenDSA-LTI/vendor/bundle/ruby/2.7.0/gems/actionpack-6.0.3.1/lib/abstract_controller/callbacks.rb:34:in `block (2 levels) in <module:Callbacks>' | |
App 2091 output: /home/ubuntu/OpenDSA-LTI/vendor/bundle/ruby/2.7.0/gems/activesupport-6.0.3.1/lib/active_support/callbacks.rb:201:in `block in halting' | |
App 2091 output: /home/ub |
This file contains 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
sudo su - postgres | |
createdb database_name | |
psql -s database_name | |
create user database_name password 'database_name'; | |
GRANT ALL PRIVILEGES ON DATABASE database_name TO database_name; | |
dropdb database_name | |
# stop postgress process and release port 5432 on Mac | |
brew services stop postgresql |
This file contains 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
{ | |
"auto_complete_commit_on_tab": true, | |
"auto_complete_delay": 1, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/User/SublimeLinter/Monokai (SL).tmTheme", | |
"default_line_ending": "unix", | |
"ensure_newline_at_eof_on_save": false, | |
"fallback_encoding": "UTF-8", | |
"font_size": 12, | |
"highlight_modified_tabs": true, |
This file contains 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
# remove the virtualbox | |
sudo apt-get autoremove 'virtualbox*' | |
# download and install 5.1 | |
http://download.virtualbox.org/virtualbox/5.1.14/virtualbox-5.1_5.1.14-112924~Ubuntu~xenial_amd64.deb | |
# download and install VirtualBox 5.1.14 Oracle VM VirtualBox Extension Pack | |
http://download.virtualbox.org/virtualbox/5.1.14/Oracle_VM_VirtualBox_Extension_Pack-5.1.14-112924.vbox-extpack |
This file contains 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
# -*- coding: utf-8 -*- | |
from time import sleep | |
import sys | |
# Print iterations progress | |
def print_progress(iteration, total, prefix='', suffix='', decimals=1, bar_length=100): | |
""" | |
http://stackoverflow.com/questions/3173320/text-progress-bar-in-the-console | |
https://gist.github.com/aubricus/f91fb55dc6ba5557fbab06119420dd6a | |
Call in a loop to create terminal progress bar |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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 | |
# | |
# Copyright 2011, Tim Branyen @tbranyen <[email protected]> | |
# Dual licensed under the MIT and GPL licenses. | |
# | |
# Automatically clone single or multiple repos into a folder, | |
# great for setting up a git projects folder. | |
# | |
# Install: curl https://gist.github.com/raw/902154/github.sh > /usr/local/bin/gh | |
# chmod +x /usr/local/bin/gh |
This file contains 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
-- http://blog.rtwilson.com/how-to-get-sublime-text-style-editing-in-the-ipythonjupyter-notebook/ | |
Anaconda 3.5 | |
custom.js file path | |
/home/hshahin/anaconda3/lib/python3.5/site-packages/notebook/static/custom/custom.js | |
So, how do you do this? It’s really simple. | |
Find your Jupyter configuration folder by running jupyter --config-dir |
This file contains 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
-- Reinstall | |
First remove MySQL: | |
sudo apt-get remove --purge mysql-server mysql-client mysql-common | |
sudo apt-get autoremove | |
sudo apt-get autoclean | |
Then reinstall: | |
sudo apt-get update | |
sudo apt-get install mysql-server |
This file contains 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 List buildList(List L) | |
{ | |
L.moveToStart(); | |
L.insert(30); | |
L.insert(23); | |
L.insert(19); | |
L.insert(4); | |
L.moveToPos(2); | |
return L; |
NewerOlder