Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Convert a ruby hash to dotted path
def hash_to_dotted_path(hash, path = "")
hash.each_with_object({}) do |(k, v), ret|
key = path + k.to_s
if v.is_a? Hash
ret.merge! hash_to_dotted_path(v, key.to_s + ".")
else
<!-- Facebook Custom Audience Pixel Code - Placed on Every Page of Site --> | |
<script> | |
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? | |
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; | |
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0; | |
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, | |
document,'script','//connect.facebook.net/en_US/fbevents.js'); | |
fbq('init', '{{facebook pixel}}'); | |
fbq('track', 'PageView'); | |
</script> |
#!/usr/bin/env bash | |
# this can be useful when developing against a custom DNS server, or | |
# for example, if you made a change to the DNS settings of a domain, and you | |
# know the authoritative nameserver IP address for a domain, you could use this | |
# to bypass the intermediate DNS cache, and apply an HTTP request using the new | |
# DNS settings supplied by your specified (authoritative) nameserver | |
curl --dns-servers <DNSIP,DNSIP> url.com |