Skip to content

Instantly share code, notes, and snippets.

View dayvsonlima's full-sized avatar

Dayvson Lima dayvsonlima

View GitHub Profile
require 'sinatra'
get '/ok' do
sleep 10
'ruby hell!'
end
ffmpeg -i video.mp4 -af "pan=mono|c0=.5*c0+.5*c1" -c:v copy output.mp4
@dayvsonlima
dayvsonlima / readme.md
Created March 15, 2018 20:56 — forked from romuloctba/readme.md
Install Adobe Photoshop CS6 on Wine (Ubuntu, Elementary OS, Linux Mint)

Step 1. Install the Wine Team Ubuntu PPA

First start by installing Wine btw it's a utility to install windows apps in linux :

open the Terminal and :

   sudo add-apt-repository ppa:ubuntu-wine/ppa     
   sudo apt-get update && sudo apt-get upgrade
   sudo apt-get install wine1.7 winetricks
def fib(n)
return n if 1 >= n
fib(n-1) + fib(n-2) if n > 1
end
def fib_include(n)
return n if (0..1).include? n
fib_include(n-1) + fib_include(n-2) if n > 1
end
var resultado = soma(1, 2);
expect(resultado).to.equal(3);
function soma(a, b){
return a + b;
}
import java.net.*;
import java.io.*;
import java.io.IOException;
import java.util.Scanner;
public class Server {
public static void main(String args[]) throws IOException {
ServerSocket server = new ServerSocket(2345);
System.out.println("Start server");
<?php
$server = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_bind($server, 'localhost', 2345);
socket_listen($server, 5);
do {
$socket = socket_accept($server);
echo socket_read($socket, 2048, PHP_NORMAL_READ);
require 'socket'
server = TCPServer.new('localhost', 2345)
loop do
socket = server.accept
request = socket.gets
STDERR.puts request
require 'socket' # Importa módulo socket
# Inicia servidor TCP na porta 2345
server = TCPServer.new('localhost', 2345)
# Inicia loop infinito
loop do
# Aguarda que um cliente se conecte e em seguida retorna um socket TCP
socket = server.accept