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
CSS Dinner: https://flukeout.github.io/ | |
Flexbox Froggy: http://flexboxfroggy.com/ | |
CSS Garder: http://cssgridgarden.com/ | |
Open VIM: http://www.openvim.com/ | |
Try Redis: http://try.redis.io/ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>Page Title</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> | |
<body> | |
<div class="responsive-container"> |
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
const getQueryVariable = variable => { | |
const query = window.location.search.substring(1); | |
const params = query.split("&"); | |
for (let i=0;i<params.length;i++) { | |
const pair = params[i].split("="); | |
if(pair[0] == variable) { | |
return pair[1]; | |
} | |
} | |
return false; |
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
.centered-div{ | |
width: auto; | |
position: relative; | |
transform: translate(-50%, 0); | |
left: 50%; | |
} |
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
<html> | |
<head> | |
<title>center image</title> | |
<link href="style.css"> | |
</head> | |
<body> | |
<div class=frame> | |
<span class="helper"></span><img src="http://via.placeholder.com/300x150" /> | |
</div> | |
<div class=frame> |
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
import os | |
for filename in os.listdir("."): | |
os.rename(filename, filename[0].upper() + filename[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
$('.decimal').keypress(function (e) { | |
var character = String.fromCharCode(e.keyCode) | |
var newValue = this.value + character; | |
if(newValue.toString().split('.')[1].length > 2) { | |
e.preventDefault(); | |
return false; | |
} | |
}); |
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
search = (list, searchQuery) => { | |
var updatedList = list; | |
updatedList = updatedList.filter(function (item) { | |
return item.toLowerCase().search( | |
searchQuery.toLowerCase()) !== -1; | |
}); | |
return updatedList; | |
} |
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 update-rc.d -f nginx disable |
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
- Assuming php is already installed in the system, open a terminal and run php -i. Copy the output. | |
- Goto https://xdebug.org/wizard.php and paste the phpinfo output in the text box. | |
- Follow the instructions. |