Skip to content

Instantly share code, notes, and snippets.

View viniciusjarina's full-sized avatar
😊

Vinicius Jarina viniciusjarina

😊
View GitHub Profile
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";
#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):
""" 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.
@viniciusjarina
viniciusjarina / culturafm
Last active February 26, 2016 13:55
CulturaFM download
#!/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
@viniciusjarina
viniciusjarina / PSProfile.ps1
Last active January 26, 2021 16:04
~\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
Set-Alias -Name "open" -Value "explorer"
Import-Module 'C:\Users\vinic\posh-git\posh-git\src\posh-git.psd1'
#Import-Module 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\vsdevshell\Microsoft.VisualStudio.DevShell.dll'
#& { Import-Module 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\vsdevshell\Microsoft.VisualStudio.DevShell.dll'; Enter-VsDevShell -InstanceId bd6d43cd}
Import-Module 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\vsdevshell\Microsoft.VisualStudio.DevShell.dll'
Enter-VsDevShell -InstanceId bd6d43cd
# Settings for the prompt are in GitPrompt.ps1, so add any desired settings changes here.
# Example:
cd ~\projects\
@subsetpark
subsetpark / gist:367f0d3fde503a1e481c
Created June 16, 2015 15:48
Building Python 2.7.10 on Ubuntu 14.04 LTS
$ sudo apt-get install -y gcc-multilib g++-multilib libffi-dev libffi6 libffi6-dbg python-crypto python-mox3 python-pil python-ply libssl-dev zlib1g-dev libbz2-dev libexpat1-dev libbluetooth-dev libgdbm-dev dpkg-dev quilt autotools-dev libreadline-dev libtinfo-dev libncursesw5-dev tk-dev blt-dev libssl-dev zlib1g-dev libbz2-dev libexpat1-dev libbluetooth-dev libsqlite3-dev libgpm2 mime-support netbase net-tools bzip2
$ wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
$ tar xvf Python-2.7.10.tgz
$ cd Python-2.7.10/
$ ./configure --prefix /usr/local/lib/python2.7.10 --enable-ipv6
$ make
$ sudo make install
@Jjagg
Jjagg / IPrimitiveBatcher.cs
Last active July 2, 2021 20:04
Platform agnostic primitive batcher with implementation for MonoGame.
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
namespace MgWheels
{
public interface IPrimitiveBatcher
{
void DrawLine(Vector2 p1, Vector2 p2, Color color, float lineWidth);
void DrawLineStrip(IEnumerable<Vector2> points, Color color, float lineWidth);
@viniciusjarina
viniciusjarina / VSCodeSettings.json
Last active November 19, 2021 04:59
VSCodeSettings.json
{
"editor.fontSize": 16,
"editor.renderWhitespace": "all",
"workbench.colorTheme": "Visual Studio Light",
"telemetry.enableTelemetry": false,
"workbench.editor.enablePreview": false,
"explorer.confirmDelete": false,
"search.quickOpen.includeHistory" : false
}
@dongle-the-gadget
dongle-the-gadget / MainWindow.xaml
Last active November 24, 2022 10:24
WinUI 3 + Windows.UI.Composition
<Window
x:Class="WinUIThreeTest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:WinUIThreeTest"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<SwapChainPanel Name="SwapChainPanel">
@yizhang82
yizhang82 / host.cpp
Created January 28, 2017 07:43
Simple coreclr host
#include <iostream>
#include <limits.h>
#include <stdlib.h>
#include <dlfcn.h>
#include <string.h>
#include <set>
#include <dirent.h>
#include <sys/stat.h>
#include "coreclrhost.h"