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 | |
clipboard = `pbpaste` | |
begin | |
output = eval(clipboard) | |
`echo #{output} | pbcopy` | |
rescue Exception => e | |
# silence exception | |
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
require 'open-uri' | |
require 'nokogiri' | |
require 'json' | |
def search word | |
open("http://www.dict.cc/?s=#{word}").read | |
end | |
keyword = ARGV.count > 0 ? ARGV.join(" ") : "stein" |
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 <stdio.h> | |
#include <stdlib.h> | |
/*3.6. De pe mediul de intrare se citeşte un număr natural n. Să se | |
verifice dacă numărul respectiv este palindrom. | |
*/ | |
int main() | |
{ | |
int n,ninv,aux; | |
printf("introduceti numarul: "); | |
scanf("%d",&n); |
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
# Update APT package index | |
sudo apt-get update | |
# Install prerequisites | |
sudo apt-get install -y git curl zlib1g-dev subversion | |
sudo apt-get install -y openssl libreadline6-dev git-core zlib1g libssl-dev | |
sudo apt-get install -y libyaml-dev libsqlite3-dev sqlite3 | |
sudo apt-get install -y libxml2-dev libxslt-dev | |
sudo apt-get install -y autoconf automake libtool bison |
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 Rack::Static, | |
:urls => ["/images", "/js", "/css", "/public"], | |
:root => "public" | |
require './webserver.rb' | |
run KoderWSApp.new |
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 'cleverbot' | |
@client1 = Cleverbot::Client.new | |
@client2 = Cleverbot::Client.new | |
def say message, voice="Vicki" | |
puts message | |
`say -v #{voice} "#{message}"` | |
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
[ | |
{ | |
"name": "class_addIvar", | |
"abstract": "Adds a new instance variable to a class. ", | |
"abstract_xml": "<p class=\"abstract\">Adds a new instance variable to a class. </p>\n", | |
"declaration": "\nBOOL class_addIvar(Class cls, const char *name, size_t size, uint8_t alignment, const char *types)\n", | |
"declaration_xml": "<pre class=\"declaration\">\nBOOL class_addIvar(Class cls, const char *name, size_t size, uint8_t alignment, const char *types)\n</pre>\n", | |
"return_value": "Return ValueYES if the instance variable was added successfully, otherwise NO (for example, the class already contains an instance variable with that name).", | |
"return_value_xml": "<div class=\"return_value\">\n<h5 class=\"tight\">Return Value</h5>\n<p><code>YES</code> if the instance variable was added successfully, otherwise <code>NO</code> (for example, the class already contains an instance variable with that name).</p>\n</div>", | |
"api_discussion": "DiscussionThis function may only be called after objc_allocat |
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
/** | |
* Macros for metaprogramming | |
* ExtendedC | |
* | |
* Copyright (C) 2012 Justin Spahr-Summers | |
* Released under the MIT license | |
*/ | |
#ifndef EXTC_METAMACROS_H | |
#define EXTC_METAMACROS_H |
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
+ (id)alloc { | |
static dispatch_once_t onceToken; | |
static SettingsViewController *singleton = nil; | |
dispatch_once(&onceToken, ^{ | |
singleton = [super alloc]; | |
}); | |
return singleton; | |
} | |
- (id)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
javascript: alert($('#_ctl3_uphone_uphwl').css('color')) |