Skip to content

Instantly share code, notes, and snippets.

View liamg's full-sized avatar

Liam Galvin liamg

View GitHub Profile
@liamg
liamg / hell.js
Created August 27, 2014 22:04
Javascript without alphanumeric characters
[][(!!+[]+'')[!+[]-~+[]-~+[]]+({}+[]+'')[-~+[]]+(!+[]+'')[-~+[]]+(!+[]+'')[+[]]][({}+[]+'')[!+[]-~+[]-~+[]-~+[]-~+[]]+({}+[]+'')[-~+[]]+([][+[]]+'')[-~+[]]+(!!+[]+'')[!+[]-~+[]-~+[]]+(!+[]+'')[+[]]+(!+[]+'')[-~+[]]+([][+[]]+'')[+[]]+({}+[]+'')[!+[]-~+[]-~+[]-~+[]-~+[]]+(!+[]+'')[+[]]+({}+[]+'')[-~+[]]+(!+[]+'')[-~+[]]]((!!+[]+'')[-~+[]]+(!!+[]+'')[!+[]-~+[]]+(!+[]+'')[!+[]-~+[]-~+[]]+(!+[]+'')[-~+[]]+(!+[]+'')[+[]]+'("'+([][(!!+[]+'')[!+[]-~+[]-~+[]]+({}+[]+'')[-~+[]]+(!+[]+'')[-~+[]]+(!+[]+'')[+[]]][({}+[]+'')[!+[]-~+[]-~+[]-~+[]-~+[]]+({}+[]+'')[-~+[]]+([][+[]]+'')[-~+[]]+(!!+[]+'')[!+[]-~+[]-~+[]]+(!+[]+'')[+[]]+(!+[]+'')[-~+[]]+([][+[]]+'')[+[]]+({}+[]+'')[!+[]-~+[]-~+[]-~+[]-~+[]]+(!+[]+'')[+[]]+({}+[]+'')[-~+[]]+(!+[]+'')[-~+[]]]((!+[]+'')[-~+[]]+(!+[]+'')[!+[]-~+[]-~+[]]+(!+[]+'')[+[]]+([][+[]]+'')[+[]]+(!+[]+'')[-~+[]]+([][+[]]+'')[-~+[]]+' '+(!!+[]+'')[!+[]-~+[]]+({}+[]+'')[-~+[]]+({}+[]+'')[!+[]-~+[]-~+[]-~+[]-~+[]]+(!!+[]+'')[-~+[]]+(!+[]+'')[+[]]+([][+[]]+'')[!+[]-~+[]-~+[]-~+[]-~+[]]+({}+[]+'')[-
@liamg
liamg / export.js
Last active March 3, 2024 10:14
Export all lastpass passwords, including hidden. If you're sick of lastpass failing to fill inputs properly, just paste this in the console on the extension vault page.
var q, p = ['Username', 'Password', 'URL'], m = LPProxy.getAllModelItems(), o = [];
for(var i in m){
q = [];
for(var j in p) q.push([p[j], m[i]['get' + p[j]]()].join(': '));
o.push(q.join('<br/>'));
}
window.location.href="data:text/html;charset=utf-8," + escape(o.join('<hr/>'));
@liamg
liamg / banner.js
Created February 13, 2016 18:46
Particles on canvas
var Particle = function (x, y, size, xSpeed, ySpeed) {
this.x = x;
this.y = y;
this.size = typeof size === 'undefined' ? Math.floor(Math.random() * 10) : size;
this.xSpeed = typeof xSpeed === 'undefined' ? Math.floor(Math.random() * 10) - 5 : xSpeed;
this.ySpeed = typeof ySpeed === 'undefined' ? Math.floor(Math.random() * 10) - 5 : ySpeed;
this.maxLifetime = 100;
this.lifetime = this.maxLifetime;
this.rgb = [255, 255, 255];
};
docker kill $(docker ps -q)
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
docker volume ls -qf dangling=true | xargs -r docker volume rm
@liamg
liamg / playlist.js
Created November 2, 2016 21:12
Google Music Playlist Exporter
var i, playlistString = '', playlist = document.querySelectorAll('tr.song-row');
for (i = 0, i < playlist.length; i++) {
var track = playlist[i];
var title = track.querySelector('td[data-col=title] span').textContent;
var artist = track.querySelector('td[data-col=artist] span').textContent;
playlistString += ('"' + artist + '", "' + title + '"\n');
}
console.log(playlistString);
/**
* Basic spoofer for GADX that always passes back.
*/
window.addEventListener("load", function load(event){
window.removeEventListener("load", load, false); //remove listener, no longer needed
if(typeof google_alternate_ad_url !== 'undefined')
{
var iframe = document.createElement('iframe');
try{ iframe.style = 'width:0px;height:0px;border:none;'; }catch(e){}
document.body.appendChild(iframe);
@liamg
liamg / slice.go
Last active September 26, 2018 10:31
Convert Go slice in interface{} to []interface{}
package main
import (
"fmt"
"reflect"
)
func convertInterfaceToSlice(slice interface{}) ([]interface{}, error) {
val := reflect.ValueOf(slice)
if val.Kind() != reflect.Slice {
@liamg
liamg / pub
Created October 17, 2018 20:17
pk
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/mcdk7EQwOQnLU/1US1yYpMHoW+9Jxz9csWbRWjlzWHEvnQkx3ov4n7d7jbUNoloZiI/SP0mdMCVoJ2oNT/Jjw/upL+Cy1U7Xa0PYVrjpOPJ9xt1JCOG/VKvRhes0TGSJ7jx76C6HRxIDUhdGxrC0VuNALNkuMIv8P+Vj/cRm+0hDnWWr0iM7HySw911voQ0tgG0qjxUjMKBeY4muFiaBRxTvCMtEzkth4680zYxVRTvdkY8ixDJJQIuUzu7gqg70i6Zcq14I/dfU0ADsYdsB4wTwkI0mr+vkA81xwG5Lvo/oRaKBW3IcynfRwNMRVCD4489LKdKuvnecUOpWRPbF lgalvin@lgalvin-Lenovo-Legion-Y530-15ICH
@liamg
liamg / y530.sh
Last active March 17, 2021 19:55
Fix wifi on Lenovo Y530
#!/usr/bin/env bash
echo "blacklist ideapad_laptop" >> /etc/modprobe.d/blacklist.conf
echo "blacklist pcspkr" > /etc/modprobe.d/nobeep.conf
echo "options r8822be aspm=0" > /etc/modprobe.d/aspmoff.conf
mv /lib/firmware/ath10k/QCA9377/hw1.0/firmware-6.bin /backup-firmware-6.bin
reboot
require 'formula'
class Sshpass < Formula
desc ""
homepage ""
url "https://sourceforge.net/projects/sshpass/files/sshpass/1.06/sshpass-1.06.tar.gz"
sha256 "c6324fcee608b99a58f9870157dfa754837f8c48be3df0f5e2f3accf145dee60"
def install
system "./configure", "--disable-debug",