[http://yeoman.io/] (Yeoman)
npm install -g yo
function isSerialized($string) { | |
return (@unserialize($string) !== false); | |
} |
function encodeHtml($string) { | |
return htmlentities($string, ENT_QUOTES, "utf-8"); | |
} |
function decodeHtml($string) { | |
return stripslashes(html_entity_decode( $string, ENT_QUOTES, "utf-8" )); | |
} |
def pid_controller(y, yc, h=1, Ti=1, Td=1, Kp=1, u0=0, e0=0) | |
"""Calculate System Input using a PID Controller | |
Arguments: | |
y .. Measured Output of the System | |
yc .. Desired Output of the System | |
h .. Sampling Time | |
Kp .. Controller Gain Constant | |
Ti .. Controller Integration Constant | |
Td .. Controller Derivation Constant |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
server_name .my_site.dev; | |
root /var/www/my_site/public; | |
# It's always good to set logs, note however you cannot turn off the error log | |
# setting error_log off; will simply create a file called 'off'. | |
access_log /var/log/nginx/my_site.access.log; |
ssh [email protected] | |
ssh-keygen -t rsa | |
exit | |
cat ~/.ssh/id_rsa.pub | ssh [email protected] 'cat >> ~/.ssh/authorized_keys' |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title> | |
My first demo | |
</title> | |
<!-- Link the Bootstrap css --> | |
<link href="components/bootstrap/dist/css/bootstrap.css" rel="stylesheet"> |
[http://yeoman.io/] (Yeoman)
npm install -g yo
from bs4 import BeautifulSoup | |
import urllib.request | |
url = "http://www.google.com/" | |
res = urllib.request.urlopen(url) | |
html = res.read() | |
soup = BeautifulSoup(html) | |
print(soup) |
var system = require('system'); | |
var fs = require('fs'); | |
var args = system.args; | |
if (args.length === 1) { | |
console.log("Please write url as argument"); | |
phantom.exit(); | |
} | |
console.log('Loading', args[1]); |