Skip to content

Instantly share code, notes, and snippets.

@rafaelrozon
rafaelrozon / embed external style sheet.html
Created June 17, 2015 23:45
embed external stylesheet
<link rel=‘stylesheet’ type=‘text/css’ href=“pathToCSSFile/file.css”
@rafaelrozon
rafaelrozon / externalStyleSheetMediaAttribute.html
Created June 17, 2015 23:49
embed external style sheet with media attribute
<link rel=‘stylesheet’ type=‘text/css’ href=‘pathToCSSFile/file.css’ media=‘screen’ />
tagName {
/* css rules */
}
#idName {
/* css rules */
}
@rafaelrozon
rafaelrozon / classSelector.css
Created June 18, 2015 00:39
class selector
.className {
/* css rules */
}
@rafaelrozon
rafaelrozon / descendantSelector.css
Created June 18, 2015 00:40
descendant selector
firstTag secondTag { /* css rules */ }
@rafaelrozon
rafaelrozon / childSelector
Created June 18, 2015 00:40
child selectors
parentTag > childTag { /* css rules */}
@rafaelrozon
rafaelrozon / pseudoClassSelector.css
Created June 18, 2015 00:41
pseudo class selector
tag:pseudoClassName { /* css rules */}
function getAllData(targetUrl) {
$.ajax({
url: targetUrl,
type: 'GET',
dataType: 'json',
success: function (data) {
// process data
},
error: function () {
@rafaelrozon
rafaelrozon / ssh_without_password.txt
Last active December 31, 2015 08:09
ssh without password
ssh-keygen -t rsa
ssh user@host mkdir -p .ssh
cat .ssh/id_rsa.pub | ssh user@host 'cat >> .ssh/authorized_keys'
ssh user@host 'chmod 700 .ssh; chmod 640 .ssh/authorized_keys'
ssh user@host
the user to authenticated needs to be owner of the authorized_keys file. Change it with
sudo chown user authorized_keys
boom, done!