npx create-react-app <project name> --typescript
cd <project name>
yarn add tslint tslint-react tslint-config-prettier --save-dev
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
ActiveRecord::Base.logger = Logger.new(STDOUT) |
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
SELECT column1, count(*) | |
FROM table | |
GROUP BY column1 | |
HAVING count(*) > 1; |
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
## General Stuff | |
### List all tables | |
SELECT * FROM pg_catalog.pg_tables | |
### Create a new user and give it superuser access | |
CREATE USER adminuser createuser password '1234Admin'; | |
ALTER USER adminuser createuser; | |
### Create a user without superuser privilege |
Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
Add ssh fingerprint and enter password provided in email
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
private bool ValidRequisitieMeet(int userId, int subjectId) | |
{ | |
// Fetch the enrollment passed status from configuration file | |
var passed = TryToParse(ConfigurationManager.AppSettings.Get("EnrollmentStatusPassed")); | |
var requisites = (from r in _context.Requisites | |
where r.SubjectId == subjectId | |
select r); | |
// For the sake of readability, use traditional way |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default%20Settings] | |
"Font"="Ubuntu Mono" | |
"FontIsBold"=dword:00000000 | |
"FontCharSet"=dword:00000000 | |
"FontHeight"=dword:0000000c | |
"FontVTMode"=dword:00000004 | |
"UseSystemColours"=dword:00000000 | |
"TryPalette"=dword:00000000 |
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
rvm uninstall ${YOURUBYVERSION} | |
sudo apt-get install libreadline-dev | |
rvm install ${YOURUBYVERSION} --with-readline-dir=/usr/include/readline |
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
xrandr --newmode $(cvt 1920 1200 60 | grep Mode | sed -e 's/.*"/1920x1200/') | |
xrandr --addmode VGA1 1920x1200 |