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
post :index do | |
if params.key?("create") | |
path = Padrino.root("tmp") | |
File.open(File.join(path, "#{params[:docId]}.pdf"), "w") do |file| | |
file.write request.body.read.force_encoding("UTF-8") | |
status 200 | |
end | |
end | |
end |
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 ruby | |
# encoding: utf-8 | |
require 'colored' | |
folders = %w{~/Development ~/Documents ~/Pictures ~/Music ~/Sites ~/Work} | |
log_path = ".sync/log" | |
destination = "/Volumes/Drobo/BACKUP/" | |
if Directory.exists? destination |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html> | |
<head> | |
<META HTTP-EQUIV="Pragma" CONTENT="no-cache" /> | |
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache" /> | |
<META HTTP-EQUIV="Content-Language" CONTENT="da" /> | |
<META HTTP-EQUIV="Content-Type" content="text/html;charset=ISO-8859-1" /> | |
</head> | |
<body> | |
<!--<div align="right"> |
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 ruby | |
# encoding: utf-8 | |
require 'pulse' | |
Pulse.connect hostname: 'uplink.io', nickname: 'Ulla2' do | |
catch :connection_ready do | |
join "#uplink" | |
end |
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 ruby | |
# encoding: utf-8 | |
require 'socket' | |
DefaultHost = 'dpmaster.deathmask.net' | |
DefaultPort = 27950 | |
ChunkSize = 2**16 | |
UDPSocket.new.tap do |socket| |
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
#include <iostream> | |
void blablabla(); | |
using namespace std; | |
int main() { | |
blablabla(); | |
cin.get(); | |
return 0; |
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 ruby | |
# encoding: utf-8 | |
oldrev, newrev, refname = gets.split | |
repository = File.expand_path($0)[/([^\/]*?)\.git/] | |
refs, type, name = refname.split ?/ |