Skip to content

Instantly share code, notes, and snippets.


Alan Szlosek Jr alanszlosek

View GitHub Profile
View sway-dell-mini
00:00:00.000 [INFO] [sway/main.c:346] Sway version 1.6-ad2e13dad1 (Jun 6 2021, branch 'master')
00:00:00.002 [INFO] [sway/main.c:154] Linux black 5.10.43-0-lts #1-Alpine SMP Fri, 11 Jun 2021 07:41:12 +0000 i686 Linux
00:00:00.003 [INFO] [sway/main.c:170] Contents of /etc/os-release:
00:00:00.003 [INFO] [sway/main.c:154] NAME="Alpine Linux"
00:00:00.003 [INFO] [sway/main.c:154] ID=alpine
00:00:00.003 [INFO] [sway/main.c:154] VERSION_ID=3.14.0
00:00:00.003 [INFO] [sway/main.c:154] PRETTY_NAME="Alpine Linux v3.14"
00:00:00.003 [INFO] [sway/main.c:154] HOME_URL=""
00:00:00.003 [INFO] [sway/main.c:154] BUG_REPORT_URL=""
00:00:00.003 [INFO] [sway/main.c:142] LD_LIBRARY_PATH=
alanszlosek /
Last active Jun 9, 2020
Build script for Sugar under Debian
set -e
# install git if not present
[ ! -e /usr/bin/git ] && sudo apt install -y git
# clone the sugar modules
for x in sugar{-datastore,-artwork,-toolkit-gtk3,} gwebsockets; do
if [ ! -e ${x} ]; then
alanszlosek / google-keep.js
Created Nov 21, 2015
Crawl Google Keep entries, concatenate them all, and print to the console. Right click on the console entry to save as a single file.
View google-keep.js
Inspect your google keep items and find the appropriate container selector, and those for the title and item body divs.
var items=document.querySelectorAll('.IZ65Hb-n0tgWb.IZ65Hb-WsjYwc-nUpftc.RNfche');
var out = '';
for(var i = 0; i < items.length; i++) {
var item = items[i];
var text = item.querySelector('.IZ65Hb-YPqjbf.r4nke-YPqjbf[contenteditable="false"]');
if(text && text.innerText.length > 0) {
View proper-multisort.php
$a = new stdClass();
$a->name = 'Zzzz';
$b = new stdClass();
$b->name = 'Bbbb';
View gist:8290784
Descends into an array or JSON object, looking for the specified elements
If one is not found, the fallback value (first argument) will be returned
Trying to alleviate the mix of error checking and object access that can litter code
Object.prototype.dive = function() {
var source = this;
alanszlosek / javascript-injection.txt
Created Mar 28, 2012
JavaScript injection example
View javascript-injection.txt
<!DOCTYPE html>
<h1>Example Scenario</h1>
<p>Save this locally as an HTML file and try it out. Open it and then look in your Firebug
or developer console. More details here:</p>