This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def foo(bar : String) | |
puts "#{bar} is a string" | |
end | |
def foo(bar : Int32) | |
puts "#{bar} is an Int" | |
end | |
etc... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is an array if Int32 | |
a = [] of Int32 | |
# or we can also do this | |
a = Array(Int32) | |
# or even | |
a = [1,2,3] | |
# this is a Hash | |
a = {} of Symbol => Int32 | |
# or |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@[Link("krb5")] | |
lib LibKRB | |
fun krb5_init_context(buff : UInt8*) : UInt32 | |
fun krb5_free_context(buff : UInt8*) : Void | |
end | |
class Krb5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
require 'colorize' | |
require 'socket' | |
puts 'Usage: ruby test_client server port dir_path'.bold | |
server = ARGV[0] | |
port = ARGV[1] | |
path_to_dir = ARGV[2] | |
serial = ARGV[3] | |
profile = ARGV[4] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'openssl' | |
require 'benchmark' | |
class Testing_Hash | |
def initialize(a_message, integer) | |
@message = a_message | |
@integer = integer | |
end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <time.h> | |
#include <unistd.h> | |
void shuffle(int *array, size_t n); | |
void print_array(int *my_array, int array_size); | |
int main(int argc, char *argv[]){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error in ./src/rsaccess-web.cr:31: instantiating 'RSAccessApp#serve()' | |
app.serve | |
^~~~~ | |
instantiating 'serve(Int32)' | |
in /home/unshadow/Desktop/git-projects/Amethyst/src/amethyst/base/app.cr:45: instantiating 'HTTP::Server#listen()' | |
server.listen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
in /home/unshadow/Desktop/git-projects/Amethyst/src/amethyst/support/sendable.cr:32: macro didn't expand to a valid program, it expanded to: | |
================================================================================ | |
-------------------------------------------------------------------------------- | |
1. case method | |
2. | |
3. | |
4. else | |
5. raise WrongInstanceMethod.new("Amethyst::Base::Controller+", "#{method}") | |
6. end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Jonne Haß <[email protected]> | |
# Contributor: Mikkel Kroman <[email protected]> | |
pkgname=crystal-git | |
pkgver=0.7.4.r0.g42efdbf | |
_last_release="0.7.4-1" | |
pkgrel=1 | |
pkgdesc="The Crystal Programming Language" | |
arch=('i686' 'x86_64') | |
url="http://crystal-lang.org" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Former code which works: | |
Thread.new(server.accept) do |client| | |
if client | |
addr = client.peeraddr if client | |
log.info("Client connected from IP: #{addr.ip_address} and port: #{addr.ip_port}") if log && addr | |
package_parser(client, log) | |
client.close if client | |
end | |
end |