Skip to content

Instantly share code, notes, and snippets.

View gsora's full-sized avatar
🤙
Vibin'

Gianguido Sorà gsora

🤙
Vibin'
View GitHub Profile
[Desktop Entry]
Name=Eclipse Mars
Type=Application
Exec=/opt/eclipse/eclipse
Terminal=false
Icon=/opt/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE;
Name[en]=Eclipse
@gsora
gsora / install-eclipse.sh
Created November 25, 2015 12:54
Simple eclipse installer
#!/bin/bash
if [[ $UID != 0 ]]; then
echo "Run this script as root."
exit 1
fi
echo "Downloading eclipse..."
wget http://eclipse.mirror.garr.it/mirrors/eclipse//technology/epp/downloads/release/mars/1/eclipse-java-mars-1-linux-gtk-x86_64.tar.gz -O /opt/eclipse.tar.gz 2>&1 | tee -a wget_log
class lista:
listafica = []
def app(self, k):
self.listafica.append(k)
def rLista(self):
return self.listafica
#################################
#
# Backend
#
#################################
# Backend to use: "xrender" or "glx".
# GLX backend is typically much faster but depends on a sane driver.
backend = "glx";
package main
import (
"fmt"
"time"
)
func main() {
for i := 0; i < 1000; i++ {
beforeGoroutine := time.Now()
package main
import (
crypto "crypto/rand"
"fmt"
"math/big"
"time"
)
func main() {
package main
import (
crypto "crypto/rand"
"fmt"
"math/big"
"runtime"
"time"
)
@gsora
gsora / clone-org
Last active March 21, 2016 13:29
Clone all the repos of given GitHub organizations
#!/usr/bin/env python3
import json
import argparse
import os
from urllib import request as r
from urllib import error
from subprocess import call as execute
parser = argparse.ArgumentParser(description='Clone all the repos of given GitHub organizations, space-divided')
Benchmark started on Mon Apr 18 13:19:45 UTC 2016
Full benchmark log: /home/gsora/bench.log
System Info
-----------
Processor : ARMv7 Processor rev 2 (v7l)
CPU Cores : 4
Frequency : MHz
Memory : 2022 MB
Swap : MB
file = open("usb_hid_keys.h", "r")
for line in file:
goodline = line[8:].split(" ")
if line.startswith("#define ") and len(goodline)>1:
key = goodline[0]
value = ""
for i in range(1, len(goodline)):
if goodline[i] == "":
continue