Skip to content

Instantly share code, notes, and snippets.

View joninvski's full-sized avatar

Joao Trindade joninvski

View GitHub Profile
@joninvski
joninvski / gist:c2c1a9bdad351c8b2caf
Created March 9, 2015 11:07
Store variable server flask
import json
import sys
from flask import Flask
from flask import request
from flask import Response
app = Flask(__name__)
clicked_push=False
@joninvski
joninvski / Android_dev_in_vim.md
Last active June 2, 2016 14:22
Android development in vim

First put a the following init.d gradle script in ${HOME}/.gradle/init.d/ (currently in build.gradle but not working in init):

 allprojects {
      tasks.withType(Compile) { // Use JavaCompile for gradle > 2.0
          options.compilerArgs << "-Xlint:deprecation"
      }
      task printDependencies << {task -> println "Subproject -> $task.project.name" }
 }

subprojects {

@joninvski
joninvski / tips.sh
Last active December 26, 2015 05:39
Gist to save general tips. Temporary while they aren't cleaned up
# Kill all sessions in tmux except the attached one:
tmux ls | grep -v attached | cut -d : -f 1 | xargs -I {} tmux kill-session -t {}
# Create a shared (group cnm_dev) git repo with acl
mkdir project
cd project
git init --bare --shared
setfacl -R -m g:cnm_dev:rwX $PWD
@joninvski
joninvski / Hex 2 Dec
Created May 6, 2013 12:51
Hex 2 Dec in perl
#!/usr/bin/perl -w
# hexadec.pl
$foo = <STDIN>;
$hexval = sprintf("%x", $foo);
$decval = hex($hexval);
print "$decval\n";
@joninvski
joninvski / pyplot tips.py
Created February 14, 2013 17:54
Pyplot tips
# Force cientific notation in pyplot
formatter = ScalarFormatter()
formatter.set_scientific(True)
formatter.set_powerlimits((-3,3))
plt.axes().yaxis.set_major_formatter(formatter)
@joninvski
joninvski / Assus u36s wifi.sh
Created January 10, 2013 11:50
Making eth0 work in asus u36s debian
# Making eth0 work in asus u36s debian
modprobe atl1c
echo "1969 1083" > /sys/bus/pci/drivers/atl1c/new_id
@joninvski
joninvski / netcat transfer.sh
Last active October 10, 2015 06:08
Using netcat to transfer files
xuartctl -p 0 -o 8o1 -s 9600 -d
# Client:
nc -v -w 30 -p 5600 -l > uart_gps_test
# Server:
nc -v -w 2 192.168.2.43 5600 < uart_gps_test
module Central
module Interactors
module ListWaitingQueue
extend self
def call()
puts "Hello"
end
private
@joninvski
joninvski / gist:7ccf6694a34c6107a7d5
Last active August 29, 2015 14:26
Interview questions

Interview planning

Time schedule:

  1. 10m - candidate CV
  2. 5m - Organization technologies and dev workflow
  3. 20m - overall computer OS/network questions
  4. 5m - linux/git
  5. 10m - scalability