Skip to content

Instantly share code, notes, and snippets.

View sarcilav's full-sized avatar

Sebastian Arcila Valenzuela sarcilav

View GitHub Profile
$ brew install -v gnu-prolog
==> Downloading http://www.gprolog.org/gprolog-1.4.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/gnu-prolog-1.4.1.tar.gz
/usr/bin/tar xf /Library/Caches/Homebrew/gnu-prolog-1.4.1.tar.gz
==> ./configure --prefix=/usr/local/Cellar/gnu-prolog/1.4.1 --with-doc-dir=/usr/local/Cellar/gnu-prolog/1.4.1/share/doc/gnu-prolog
./configure --prefix=/usr/local/Cellar/gnu-prolog/1.4.1 --with-doc-dir=/usr/local/Cellar/gnu-prolog/1.4.1/share/doc/gnu-prolog
checking for gcc... /usr/bin/clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
#include <Servo.h>
Servo myservo; // create servo object to control a servo
// a maximum of eight servo objects can be created
int pos = 0; // variable to store the servo position
int incomingByte = 0; // for incoming serial data
void setup()
{
require 'rubygems'
require 'active_record'
ActiveRecord::Base.establish_connection(:adapter => "SOME", :database => "OTHER")
ActiveRecord::Schema.define do
create_table :countries do |t|
table.column :name, :string
end
plain:
driver = plaintext
public_name = PLAIN
server_prompts = :
server_condition = ${if eq{${readsocket{COURIERSOCKET}{AUTH
${eval:13+${strlen:$2$3}}\nexim\n\login\n$2\n$3\n}{5s}{ } }}{FAIL }{no}{yes}}
server_set_id = $2
login:
driver = plaintext
telnet 192.168.1.212 25
Trying 192.168.1.212...
Connected to 192.168.1.212.
Escape character is '^]'.
220 alejandro-notebook ESMTP Exim 4.74 Thu, 24 May 2012 21:50:20 -0500
hello alejandro-notebook
500 unrecognized command
helo alejandro-notebok
250 alejandro-notebook Hello goliat.local [192.168.1.222]
mail from: rectoria@eafit.edu.co
#include <stdio.h>
int main()
{
int arr[] = {1,2,3, [10] = 1}, i;
for (i = 0; i < 11 && printf("%d ", arr[i]); ++i);
puts("");
return 0;
}
def update_with_password(params, *options)
super(params, *options).tap do |result|
if result and params[:password].blank?
self.errors.add(:password, :blank)
result = false
end
end
end
def datetime_fields(object_name, method)
html = date_select(object_name, method)
html << "-"
html << select_hour(Time.now, field_name: "#{method}(4i)", prefix: object_name)
html << ":"
html << select_tag("#{object_name}[#{method}(5i)]", options_for_select([0,15,30,45]))
end
a = Proc.new{ |*args| puts *args }
def foo(*args)
if block_given?
yield *args
end
end
foo(1, 2, &a)
#include<iostream>
#include<math.h>
#include"parameters.hpp"
#include"macros.hpp"
//#include"dynamicsystem.hpp"
extern "C"{
#include"array.h"
#include"interpolation.h"
}