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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- For assistance related to logback-translator or configuration --> | |
<!-- files in general, please contact the logback user mailing list --> | |
<!-- at http://www.qos.ch/mailman/listinfo/logback-user --> | |
<!-- --> | |
<!-- For professional support please see --> | |
<!-- http://www.qos.ch/shop/products/professionalSupport --> | |
<!-- --> | |
<configuration debug="false" scan="true" scanPeriod="3600 seconds"> |
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
class Being | |
def move | |
puts 'moving' | |
end | |
end | |
class Human < Being | |
end | |
# Human has the move method due to inheritance |
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 'bundler' | |
Bundler.setup(:default) | |
require 'active_record' | |
require 'minitest/autorun' | |
require 'logger' |
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
FROM dockerfile/nodejs | |
MAINTAINER Cristian Mircea Messel <[email protected]> | |
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 | |
RUN echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/10gen.list | |
RUN apt-get update -y | |
RUN apt-get install -y mongodb-server |
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 | |
class Array | |
def sorted? | |
self.sort == self | |
end | |
def random_sort! | |
while !self.sorted? |
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
<?php | |
// keep lines shorter than 80 columns. it makes it easier to read | |
$url = 'http://coinmarketcap.northpole.ro/api/doge.json'; | |
$data = json_decode(file_get_contents($url)); | |
// try and comment out this method. see what it does. google it a bit | |
// an alternative to var_dump is print_r (bonus points if you tell me the diff) | |
// var_dump($data); |
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
import java.awt.AWTException; | |
import java.awt.Robot; | |
import java.awt.event.InputEvent; | |
public class Wow { | |
public static void main(String[] args) { | |
try { | |
Robot robot = new Robot(); | |
robot.delay(2000); |
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
Acesta e mesajul | |
0745123123 | |
0745321321 | |
0732000245 |
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
public void post(String url, List<NameValuePair> nameValuePairs) { | |
HttpClient httpClient = new DefaultHttpClient(); | |
HttpContext localContext = new BasicHttpContext(); | |
HttpPost httpPost = new HttpPost(url); | |
try { | |
MultipartEntity entity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE); | |
for(int index=0; index < nameValuePairs.size(); index++) { | |
if(nameValuePairs.get(index).getName().equalsIgnoreCase("image")) { |
NewerOlder