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 lang="ja"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>The Vivlio Daily【Sample Edition】第0042号</title> | |
<link rel="stylesheet" type="text/css" href="style.css" /> | |
</head> | |
<style> | |
@charset "UTF-8"; | |
html { |
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
gcloud auth application-default login \ | |
--scopes=https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/datastore \ | |
--client-id-file=$(ls client_secret_*.json) |
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
var nodes = document.querySelectorAll('[data-name=GroupProfileGridItem]'); | |
var users = []; | |
for (i of nodes){ | |
var name = i.children[1].children[1].children[0].children[1].children[0].textContent | |
var profilePic = i.children[0].children[0].src | |
users.push({name, profilePic}); | |
} | |
console.log(users) | |
# in chrome dev tools we can use copy(object) to copy users. |
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 | |
# WeatherReporter 1.0 | |
scriptDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |
scriptFile="$scriptDir/$0" | |
tmpWeatherXMLFile="$scriptDir/sydneyData.xml" | |
logFile="$scriptDir/weatherReport.log" | |
tmpCronFile="$scriptDir/cronInfo" | |
function checkRequiredUtils() { |
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
gpg2 --symmetric --cipher-algo AES256 -o enc-secrets.zip ./secrets.zip | |
# remember the password. Never save digitally - | |
rm -rf ~/.gnupg/ | |
shred --remove secrets.zip | |
# upload to a cloud service - | |
shred --remove enc-secrets.zip |
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
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
function getPairs(arr){ | |
var pairsList = []; | |
for (var i=0; i < arr.length - 1; i++){ | |
for (var j=i+1; j < arr.length; j++){ | |
pairsList.push([arr[i], arr[j]]); | |
} | |
} | |
return (pairsList); | |
} |
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
return (Math.max.apply(null, arr)); |
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
/* arr - Array | |
index - int index to remove | |
*/ | |
function rm_arr (arr, index){ | |
arr.splice(index, 1); | |
return (arr); | |
} |
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
# ------------------------------------------------------------- | |
# quick script to read a file and transfer content using curl | |
# by @_hddananjaya | |
# ------------------------------------------------------------- | |
import base64 | |
import os | |
HTTPD = "127.0.0.1:8080" |
NewerOlder