Skip to content

Instantly share code, notes, and snippets.

Avatar
💭

Guillermo Iguaran guilleiguaran

💭
View GitHub Profile
View hello.d
import webcaret.application;
import heaploop.looping;
import std.string;
void main() {
loop ^^ {
auto app = new Application;
app.router.get("/") ^ (req, res) {
res.write("Hello World");
};
View gnugo.sh
#!/bin/sh
root=$(pwd)
echo "Downloading GNU Go 3.8..."
curl http://mirrors.kernel.org/gnu/gnugo/gnugo-3.8.tar.gz -s -o - | tar xzf - -C .
cd gnugo-*
echo "Compiling..."
./configure
View sqrt.go
package main
import "fmt"
func abs(x float64) float64 {
if x > 0 {
return x
} else {
return -x
}
View application-8a31c931e49c2706ef714f7a5253788e.css
body{background-image:url("/assets/bg-ef8538157f3dc9558b9443c31ccd896c.jpg")}
View qos-tag.patch
diff -r 67ee979a1807 src/applications/model/onoff-application.cc
--- a/src/applications/model/onoff-application.cc Tue Apr 08 14:07:33 2014 -0700
+++ b/src/applications/model/onoff-application.cc Sun May 18 14:18:06 2014 -0500
@@ -39,6 +39,7 @@
#include "ns3/trace-source-accessor.h"
#include "onoff-application.h"
#include "ns3/udp-socket-factory.h"
+#include "ns3/qos-tag.h"
#include "ns3/string.h"
#include "ns3/pointer.h"
View qos-application.diff
diff -r 67ee979a1807 src/applications/model/onoff-application.cc
--- a/src/applications/model/onoff-application.cc Tue Apr 08 14:07:33 2014 -0700
+++ b/src/applications/model/onoff-application.cc Sun May 18 20:00:09 2014 -0500
@@ -39,8 +39,10 @@
#include "ns3/trace-source-accessor.h"
#include "onoff-application.h"
#include "ns3/udp-socket-factory.h"
+#include "ns3/qos-tag.h"
#include "ns3/string.h"
#include "ns3/pointer.h"
View output
RegularWifiMac:RegularWifiMac(0x7f82ebd2f830)
MacRxMiddle:MacRxMiddle()
MacRxMiddle:SetForwardCallback()
[mac=00:00:00:00:00:00] MacLow:MacLow(0x7f82ebd0f040)
DcfManager:DcfManager(0x7f82ebd261d0)
DcfManager:SetupLowListener(0x7f82ebd261d0, 0x7f82ebd0f040)
DcaTxop:DcaTxop(0x7f82ebd2c720)
DcaTxop:SetMinCw(0x7f82ebd2c720, 15)
DcaTxop:SetMaxCw(0x7f82ebd2c720, 1023)
DcaTxop:SetAifsn(0x7f82ebd2c720, 2)
View qos-application.diff
diff -r 13017af6d1b0 src/applications/model/onoff-application.cc
--- a/src/applications/model/onoff-application.cc Thu May 15 16:09:51 2014 -0700
+++ b/src/applications/model/onoff-application.cc Tue May 20 14:12:58 2014 -0500
@@ -39,8 +39,10 @@
#include "ns3/trace-source-accessor.h"
#include "onoff-application.h"
#include "ns3/udp-socket-factory.h"
+#include "ns3/qos-tag.h"
#include "ns3/string.h"
#include "ns3/pointer.h"
View country_checker.rb
class CountryChecker
COUNTRY_DB = nil # FIX
def initialize(app, options = {})
@app = app
@ip_override = options[:allow_ip_override]
end
def call(env)
request = Rack::Request.new(env)
View scores.swift
let individualScores = [75, 43, 103, 87, 12]
var teamScore = 0
for score in individualScores {
if score > 50 {
teamScore += 3
} else {
teamScore += 1
}
}
teamScore