- www.gideondsouza.com
This file contains 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
<html> | |
<head> | |
<title>Image Upload</title> | |
</head> | |
<body> | |
<h1>Upload Image</h1> | |
<form action="/save_image" method="POST" enctype="multipart/form-data"> | |
<input type="file" name="file"> | |
<input type="submit" value="Upload image"> |
This file contains 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 'sinatra' | |
get "/" do | |
erb :form | |
end | |
post '/save_image' do | |
@filename = params[:file][:filename] | |
file = params[:file][:tempfile] |
This file contains 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
00000000000i[ ] Bochs x86 Emulator 2.6.2.svn | |
00000000000i[ ] Built from SVN snapshot after release 2.6.2 | |
00000000000i[ ] Compiled on Oct 17 2013 at 20:19:45 | |
00000000000i[ ] System configuration | |
00000000000i[ ] processors: 1 (cores=1, HT threads=1) | |
00000000000i[ ] A20 line support: yes | |
00000000000i[ ] IPS is set to 1000001 | |
00000000000i[ ] CPU configuration | |
00000000000i[ ] SMP support: no | |
00000000000i[ ] level: 6 |
This file contains 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
use strict; | |
use warnings; | |
use v5.10; | |
sub sort_ | |
{ | |
my @xs = @_; | |
if(scalar(@xs) == 0) {return ();} | |
my @lesser = sort_(grep { $_ < $xs[0] } @xs); | |
my @greater = sort_(grep { $_ > $xs[0] } @xs); |
This file contains 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
Gideons-Mac-mini:compiler gideon$ g++ -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS=1 -o parser parser.cpp tokens.cpp main.cpp | |
Undefined symbols for architecture x86_64: | |
"_LLVMLinkInJIT", referenced from: | |
(anonymous namespace)::ForceJITLinking::ForceJITLinking()in ccax3uOX.o | |
"CodeGenContext::generateCode(NBlock&)", referenced from: | |
_main in ccax3uOX.o | |
"CodeGenContext::runCode()", referenced from: | |
_main in ccax3uOX.o | |
"llvm::getGlobalContext()", referenced from: | |
CodeGenContext::CodeGenContext()in ccax3uOX.o |
This file contains 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
package Dancer2::Plugin::Auth::Github; | |
use strict; | |
use warnings FATAL => 'all'; | |
use Carp 'croak'; | |
use Dancer2; | |
use Dancer2::Plugin; | |
use Digest::SHA qw(sha256_hex); |
This file contains 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
package YourDancerApplication; | |
use Dancer2; | |
use lib "../dancer2-plugin-auth-github/lib"; | |
use Dancer2::Plugin::Auth::Github; | |
set 'session' => 'YAML'; | |
auth_github_init(); | |
This file contains 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
cpanm (App::cpanminus) 1.6942 on perl 5.012004 built for darwin-thread-multi-2level | |
Work directory is /Users/gideon/.cpanm/work/1379605518.67859 | |
You have make /usr/bin/make | |
You have LWP 6.05 | |
You have /usr/bin/tar: bsdtar 2.8.3 - libarchive 2.8.3 | |
You have /usr/bin/unzip | |
Searching Tkx on cpanmetadb ... | |
--> Working on Tkx | |
Fetching http://www.cpan.org/authors/id/G/GA/GAAS/Tkx-1.09.tar.gz | |
-> OK |
This file contains 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
package YourDancerApplication; | |
use Dancer ':syntax'; | |
use Dancer::Plugin::Auth::Github; | |
#You must use a session backend. | |
#You should be able to use any backend support by dancer. | |
set 'session' => 'Simple'; | |
#make sure you call this first. |
This file contains 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
#!/usr/bin/env perl | |
use Dancer; | |
get '/' => sub { | |
"Hello World!" | |
}; | |
dance; |