Skip to content

Instantly share code, notes, and snippets.

View simonwh's full-sized avatar

Simon Westh Henriksen simonwh

  • Copenhagen, Denmark
  • 03:00 (UTC +02:00)
View GitHub Profile
@simonwh
simonwh / banker.c
Created October 30, 2012 12:03
Homeworkz
#include<stdio.h>
#include<stdlib.h>
#include <sys/time.h>
#include <pthread.h>
typedef struct state {
int *resource;
int *available;
int **max;
int **allocation;
all: fifo
OBJS = list.o main.o
LIBS= -lpthread
fifo: main.o ${OBJS}
gcc -o $@ ${LIBS} ${OBJS}
listtest: listtest.o
gcc list.c listtest.c -o listtest ${LIBS}
all: fifo
OBJS = list.o main.o
LIBS= -lpthread
fifo: main.o ${OBJS}
gcc -o $@ ${LIBS} ${OBJS}
listtest: listtest.o
gcc list.c listtest.c -o listtest ${LIBS}
Contents of your deploy log:
* executing `deploy'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
updating the cached checkout on all servers
* executing "if [ -d /var/deploy/club_guide_sao_paulo/web_head/shared/cached-copy ]; then cd /var/deploy/club_guide_sao_paulo/web_head/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard 58f773dd24831bf05976df213eeda04c064a3c3e && git clean -q -d -x -f; else git clone -q -b deploy [email protected]:f3ng3r/clubguide.git /var/deploy/club_guide_sao_paulo/web_head/shared/cached-copy && cd /var/deploy/club_guide_sao_paulo/web_head/shared/cached-copy && git checkout -q -b deploy 58f773dd24831bf05976df213eeda04c064a3c3e; fi"
servers: ["198.199.83.221"]
[198.199.83.221] executing command
command finished in 1762ms
class DeviseCreateUsers < ActiveRecord::Migration
def self.up
create_table(:users) do |t|
## Database authenticatable
t.string :email, :null => false, :default => ""
t.string :encrypted_password, :null => false, :default => ""
## Recoverable
t.string :reset_password_token
t.datetime :reset_password_sent_at
module ActionController
module Flash
extend ActiveSupport::Concern
included do
delegate :alert, :notice, :error, :success, :to => "request.flash"
helper_method :alert, :notice, :error, :success
end
protected
<html i18n-values="dir:textdirection" subframe="" dir="ltr"><head>
<meta name="viewport" content="width=device-width, initial-scale=1.0,
maximum-scale=1.0, user-scalable=no">
<title i18n-content="title">https://cms.tourdynamics.com/StartUserSession.aspx?k=%2BNy0JPU0EflBc8t0kMg19bcuW0vUNRdotHsSo9aa2ZpQq7nQ1jC6sOw1D5K2v8gwz9vLQXpZ00UJu6NY/bNTmWEKfm6FEpC21aiSgY2tZT%2Bg3hWzYjfD7GKikLkwz6PA er ikke tilgængelig</title>
<style>
body {
background-color: #E6E6E6;
font-family: Helvetica, Arial, sans-serif;
font-size: 10pt;
{"HotelInfo":{"Name":"Oro Blanco Apartments","Destination":"Tenerife","ImageURL":"http://cf90056aui99.cdnserver.net/tdrz/i/img.php?folder1=destinations&folder2=hotelimages&img=bb4_sizedisplayheight300hotelamtses1tjqfilenamepiscina+2.jpg&w=0&h=0","Stars":2,"Themes":["Familjehotell","Strandhotell"]},"FlightMatrix":{"matrixGenerationTimeField":0,"carriersField":[{"stopsField":[{"combinationsField":[{"legsField":[{"flightsField":[{"departureTimeField":"2014-01-06T17:20:00.0000000+00:00","originTerminalField":null,"arrivalTimeField":"2014-01-06T21:00:00.0000000+00:00","destinationTerminalField":null,"classOfServiceField":null,"codeShareField":null,"changeOfPlaneField":false,"tokenField":null,"passengerFlightDetailsField":null,"carrierField":"VY","flightNumberField":"1877","originField":"CPH","destinationField":"AGP","flightTimeField":220}],"upgradesField":null,"upgradePiecesField":null,"travelTimeField":220,"idField":"500d5589-4257-4fc3-801b-565beceb8258","originField":"CPH","destinationField":"AGP"},{"flightsFiel
h2 Bestilling fra NetOil.dk
p Følgende varer er bestilt:
table style="border-collapse: collapse;"
tr
th style="text-align: left; padding-right: 20px;" Antal
th style="padding-right: 20px;" Produktkode
th style="text-align: left;" Produkt
- @line_items.each do |line_item|
@simonwh
simonwh / azureblob.rb
Created April 10, 2018 16:54
Azureblob
# encoding: utf-8
require "logstash/inputs/base"
require "logstash/namespace"
require "azure/storage"
require "base64"
require "securerandom"
# Reads events from Azure Blobs
class LogStash::Inputs::Azureblob < LogStash::Inputs::Base