Skip to content

Instantly share code, notes, and snippets.

View lsevero's full-sized avatar

Lucas Severo lsevero

  • São Paulo, Brazil
View GitHub Profile
@lsevero
lsevero / coroutine_scheduler.lua
Created March 19, 2016 22:14 — forked from Deco/coroutine_scheduler.lua
Lua Coroutine Scheduler
pcall(require,"socket")
local coroutine_scheduler = {
_NAME = "coroutine_scheduler.lua"
_VERSION = "1.0.0",
}
local Scheduler
do Scheduler = setmetatable({}, {
__call = function(class)
@lsevero
lsevero / tmux-cheatsheet.markdown
Created November 3, 2016 11:02 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
//
// Copyright (c) 2014 Sean Farrell
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
@lsevero
lsevero / dualshock-research
Created March 27, 2017 12:37 — forked from johndrinkwater/dualshock-research
I’m interested in writing (or helping to spec out the protocol so someone else can write) the linux kernel driver for Sony’s DualShock 4 (PS4’s lovely controller) Currently using the output of HID RAW from a USB connected dualshock 4… For the gyro/touchpad discovery, I’ve just been using some terrible c code to throw numbers on the screen and it…
TADA, it’s `hexdump -v -e '64/1 "%02x" "\n"' < /dev/hidraw3`
No idea what the first byte is… but I’m going to assume its for device ID for the many users that are connected, but it probably has to be set by the connected machine?
01ff777f7f0800aa0000435dfdf1ff14000200c5ff0721150300000000001b000001fc9133a32990880428008000000080000000008000000080000000008000
↑↑↑↑
left stick, value, first field is horz (00 left), second field is vertical (00 top)
017f80ff61080064000059f2fdfffffbff0e00d107081e9bf600000000001b0000018e94b1b00690880428008000000080000000008000000080000000008000
↑↑↑↑
@lsevero
lsevero / Simple Verlet Physics Engine.markdown
Created July 20, 2017 11:09
Simple Verlet Physics Engine
@lsevero
lsevero / command.py
Created February 5, 2018 18:28 — forked from elleryq/command.py
Wrap shell command as python function
# -*- encoding: utf-8 -*-
import subprocess
class command(object):
def __init__(self, cmd):
self._cmd = cmd
def __call__(self, *args, **kwargs):
cmd = [self._cmd]
@lsevero
lsevero / Chromecast batch conversion script
Created July 11, 2018 00:44 — forked from steventrux/Chromecast batch conversion script
A bash script to batch convert video files for chromecast compatibility
#! /bin/bash
# Batch Convert Script by StevenTrux
# The Purpose of this Script is to batch convert any video file to mp4 or mkv format for chromecast compatibility
# this script only convert necessary tracks if the video is already
# in H.264 format it won't convert it saving your time!
# Put all video files need to be converted in a folder!
# the name of files must not have " " Space!
# Rename the File if contain space
import Html exposing (..)
import Html.App exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Html.Attributes exposing (..)
import Http
import Task exposing (Task)
import Json.Decode as Json exposing ((:=))
type Msg
@lsevero
lsevero / Facebook.elm
Created November 2, 2018 22:10 — forked from groteck/ Facebook.elm
elm facebook integration test
port module Facebook exposing (..)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import String
import Debug
main =
@lsevero
lsevero / Makefile
Created November 22, 2018 13:21 — forked from gvillalta99/Makefile
TDD on VHDL
#Project file
PRJ=counter_tb.prj
#Compiled executable
EXE=counter_tb.exe
#TCL commands that will run in the simulator
CMD=isim.cmd
#Temporary Command file
CMDTMP=isim.tmp.cmd
#Waveform DataBase from simulation
WDB=isim.wdb