Skip to content

Instantly share code, notes, and snippets.

Vinicius Jarina viniciusjarina

Block or report user

Report or block viniciusjarina

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View LargestRectangle.cpp
// largestRectangle.cpp : Defines the entry point for the console application.
//
#include <string>
#include <vector>
#include <fstream>
#include <iostream>
#include <algorithm>
using namespace std;
View base_encoder.py
""" base_x.py
Encoding to, and decoding from, "any" numerical base. Using the Encoder
class, converters for base 16, 8, 2 etc. can easily be defined, but
uncommon bases like 13, 29 or 62 are just as easy. The user can also
provide his own string with "numbers".
24 Dec 98 Creation. [HN]
08 Jan 99 Added BinaryEncoder, btoi, itob.
11 Jan 99 Encoder.__init__: basestr now has default value.
View cellid_2_pos.py
#Begin
#!/usr/local/bin/python
#import httplib
import urllib
from google.appengine.api import urlfetch
from struct import *
def cellid_2_pos(cellid, lac, mnc = 0, mcc = 0):
View gist:b97adde7cb7c0870e52e
using System;
using NLua;
namespace EventLua
{
public class MyClass
{
public Action actionFromLua;
}
@viniciusjarina
viniciusjarina / Xamarin Studio.tmTheme
Created Jul 15, 2015
Xamarin Studio tmTheme for Sublime/TextMate
View Xamarin Studio.tmTheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Generated by: TmTheme-Editor -->
<!-- ============================================ -->
<!-- app: http://tmtheme-editor.herokuapp.com -->
<!-- code: https://github.com/aziz/tmTheme-Editor -->
<plist version="1.0">
<dict>
<key>name</key>
<string>Xamarin Studio (based on Snappy Light)</string>
View PrintDataGridView.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Printing;
using System.Windows.Forms;
View gist:9050b53255a3d876de2e
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace AR.Drone.Infrastructure
{
public static class InteropHelper
{
public const string LD_LIBRARY_PATH = "LD_LIBRARY_PATH";
@viniciusjarina
viniciusjarina / culturafm
Last active Feb 26, 2016
CulturaFM download
View culturafm
#!/bin/sh
if [$# -ne 2]; then
echo "Usage: $0 output lenght_seconds" >&2
exit 1
fi
#!/bin/sh
/Applications/VLC.app/Contents/MacOS/VLC -v "http://midiaserver.tvcultura.com.br:8003/;stream/1" --sout "#duplicate{dst=std{access=file,mux=raw,dst=$1.mp3}" --stop-time=$2 vlc://quit
View gist:7508169
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NLua;
namespace ConsoleApplication2
{
class Program
@viniciusjarina
viniciusjarina / Dama2001.c
Created Jul 23, 2013
Dama2001 - 15 yo checkers
View Dama2001.c
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include "allegro.h"
#include <math.h>
#include <conio.h>
#include <ctype.h>
#define NADA -10
#define X1 ((xf-x0)/abs(xf-x0))
You can’t perform that action at this time.