###SSH into a remote machine###
ssh [email protected]
#or by ip address
ssh [email protected]
exit: exit
###Install Something###
#If it's a new server, update apt-get first thing
# --------------------------------------- | |
# Main Module | |
# --------------------------------------- | |
user nginx; | |
# This number should be, at maximum, the number of CPU cores on your system. | |
worker_processes 2; | |
pid /var/run/nginx.pid; | |
# Only log critical errors |
class Paginate(object): | |
result_size = 0 | |
current_page = 0 | |
def __init__(self, results, page, limit=5): | |
self.result_size = len(results) | |
self.current_page = page | |
self.results = results | |
self.limit = limit |
;(function TimeThisMother() { | |
window.onload = function(){ | |
setTimeout(function(){ | |
var t = performance.timing; | |
alert("Speed of selection is: " + (t.loadEventEnd - t.responseEnd) + " milliseconds"); | |
}, 0); | |
}; | |
})(); |
/* | |
this is a work around adding numbers and taking care of those that are floats | |
for e.g | |
function add(x, y){ | |
return x + y; | |
} | |
add(0.3, 0.1); this will not equal to 0.4 for floats are treated differently see the below link | |
http://stackoverflow.com/questions/588004/is-floating-point-math-broken | |
*/ | |
function add(a, b, precision) { |
###SSH into a remote machine###
ssh [email protected]
#or by ip address
ssh [email protected]
exit: exit
###Install Something###
#If it's a new server, update apt-get first thing
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
/** | |
* Extend Recent Posts Widget | |
* | |
* Adds different formatting to the default WordPress Recent Posts Widget | |
*/ | |
Class My_Recent_Posts_Widget extends WP_Widget_Recent_Posts { | |
function widget($args, $instance) { | |
__d("Chromedome", ["fbt"], function(a, b, c, d, e, f, g) { | |
f.start = function(h) { | |
if (h.off || top !== window ||!/(^|\.)facebook\.com$/.test(document.domain)) | |
return; | |
var i = h.stop || "Stop!", j = h.text || "This is a browser feature intended for developers. If someone told you to copy-paste something here to enable a Facebook feature or \"hack\" someone's account, it is a scam and will give them access to your Facebook account.", k = h.more || g._("For more information, see {url}.", [g.param("url", 'https://www.facebook.com/selfxss')]); | |
if ((window.chrome || window.safari)&&!h.textonly) { | |
var l = 'font-family:helvetica; font-size:20px; '; | |
[[i, h.c1 || l + 'font-size:50px; font-weight:bold; ' + 'color:red; -webkit-text-stroke:1px black;'], [j, h.c2 || l], [k, h.c3 || l], ['', '']].map(function(r) { | |
setTimeout(console.log.bind(console, '\n%c' + r[0], r[1])); | |
}); |
Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element
or the /deep/
path selector.
video::webkit-media-controls-timeline {
background-color: lime;
}
video /deep/ input[type=range] {