This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<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: | |
http://blog.alanszlosek.com/post/20077489479/tag-stripping-not-sufficient-to-prevent-javascript</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script> | |
/* | |
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(E_ALL); | |
$a = new stdClass(); | |
$a->name = 'Zzzz'; | |
$b = new stdClass(); | |
$b->name = 'Bbbb'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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="https://alpinelinux.org/" | |
00:00:00.003 [INFO] [sway/main.c:154] BUG_REPORT_URL="https://bugs.alpinelinux.org/" | |
00:00:00.003 [INFO] [sway/main.c:142] LD_LIBRARY_PATH= |