http://winavr.sourceforge.net/
Determine what bits using http://www.engbedded.com/fusecalc
# Simply change the project settings in this section | |
# for each new project. There should be no need to | |
# modify the rest of the script. | |
set tb_name tb_top | |
set library_file_list [list \ | |
work [list \ | |
../../src/rtl/top.v \ | |
../../src/tb/$tb_name.v] \ |
http://winavr.sourceforge.net/
Determine what bits using http://www.engbedded.com/fusecalc
#!/bin/sh | |
# | |
# Amazon EC2 user-data file for automatic configuration of IPsec/L2TP VPN server | |
# on a Ubuntu or Debian instance. Tested with Ubuntu 14.04 & 12.04 and Debian 8 & 7. | |
# With minor modifications, this script *can also be used* on dedicated servers | |
# or any KVM- or XEN-based Virtual Private Server (VPS) from other providers. | |
# | |
# DO NOT RUN THIS SCRIPT ON YOUR PC OR MAC! THIS IS MEANT TO BE RUN WHEN | |
# YOUR AMAZON EC2 INSTANCE STARTS! | |
# |
sudo apt-get update | |
sudo apt-get install memcached python-dev python-pip sqlite3 libcairo2 \ | |
libcairo2-dev python-cairo pkg-config | |
sudo pip install -U pip | |
sudo pip install uwsgi | |
sudo adduser graphite | |
sudo su graphite | |
cd ~ |
$ wget http://tengine.taobao.org/download/tengine-1.3.0.tar.gz | |
$ wget http://download.savannah.gnu.org/releases/libunwind/libunwind-1.0.1.tar.gz | |
$ wget http://gperftools.googlecode.com/files/gperftools-2.0.tar.gz | |
$ tar zxvf libunwind-1.0.1.tar.gz && cd libunwind-1.0.1 | |
$ CFLAGS=-fPIC ./configure | |
$ make CFLAGS=-fPIC | |
$ sudo make CFLAGS=-fPIC install | |
$ cd .. |
ko.mustacheTemplateEngine = function () { | |
this['getTemplateNode'] = function (template) { | |
var templateNode = document.getElementById(template); | |
if (templateNode == null) | |
throw new Error("Cannot find template with ID=" + template); | |
return templateNode; | |
} | |
this['renderTemplate'] = function (templateId, data, options) { |
# change postgresql template1 db encoding to utf8 (unicode) by dropping it and recreating from template0 | |
UPDATE pg_database SET datistemplate=false WHERE datname='template1'; | |
drop database template1; | |
create database template1 with template = template0 encoding = 'UTF8'; |
# -*- coding: utf-8 -*- | |
""" | |
Extremely fast Django test runner, based on the idea that your database schema | |
and fixtures are changed much more seldom that your code and tests. All you | |
need is to make sure that your "quickstart.sqlite" database file is always up | |
to date. | |
BEWARE: Don't run this test runner on production server. It assumes that you | |
use only one database configured as "default", and its db engine is SQLite. | |
Otherwise your tests can eat your data! |
#Newbie programmer | |
def factorial(x): | |
if x == 0: | |
return 1 | |
else: | |
return x * factorial(x - 1) | |
print factorial(6) | |
#First year programmer, studied Pascal |