- Some utilities:
sudo apt-get install vim tmux git
- Copy/paste from the command line:
sudo apt-get install xclip
#!/bin/bash | |
set -x | |
ENV=${3:-development} | |
git pull origin master | |
git merge master | grep 'Already up-to-date' | |
#git pull $1 $2 | |
#git merge $1/$2 | grep 'Already up-to-date' | |
CHANGES=$? |
def unzip_file (file, destination) | |
Zip::ZipFile.open(file) { |zip_file| | |
zip_file.each { |f| | |
f_path=File.join(destination, f.name) | |
FileUtils.mkdir_p(File.dirname(f_path)) | |
if File.exist?(f_path) | |
FileUtils.rm_rf(f_path) | |
end | |
zip_file.extract(f, f_path) unless File.exist?(f_path) |
#include "mpi.h" | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#define TAG_SEND_CHAR 1 | |
#define TAG_SEND_NUM 2 | |
#define TAG_ASK_CHAR 3 |
#include <stdio.h> | |
#include <string.h> | |
#include <curl/curl.h> | |
int main(int argc, char *argv[]) | |
{ | |
struct curl_httppost *post = NULL; | |
struct curl_httppost *last = NULL; | |
CURLcode res; |
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.country { | |
fill: #b8b8b8; | |
stroke: #fff; | |
stroke-width: .5px; | |
stroke-linejoin: round; | |
} |
#include <stdio.h> | |
#include <iostream> | |
#include <string> | |
#include <curl/curl.h> | |
using namespace std; | |
static string data; | |
size_t writeCallback(char *buf, size_t size, size_t nmemb, void *up) | |
{ |
language: python | |
python: | |
# - "2.6" | |
- "2.7" | |
services: mysql | |
env: | |
# - DJANGO=1.2.7 | |
# - DJANGO=1.3.1 | |
- DJANGO=1.4.3 DJANGO_SETTINGS_MODULE="mysite.travis_settings" | |
install: |
class ServiceStartForm(forms.Form): | |
serviceList = service.models.Service.objects.all() | |
print serviceList.count() | |
b = {} | |
for aService in serviceList: | |
b[aService.id] = aService.name | |
c = b.items() | |
print "Within the form, ", serviceList.count() | |
serviceChoice = forms.ChoiceField(choices=c, widget=forms.Select()) | |
input_directory = forms.CharField(max_length=200) |
TEMPLATE_DIRS = ( | |
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". | |
# Always use forward slashes, even on Windows. | |
# Don't forget to use absolute paths, not relative paths. | |
os.path.realpath(os.path.dirname(__file__))+'/templates/', | |
# Sample Template | |
) |