https://github.com/SavageCore/xone-steam-deck-installer
// 1. open browser dev console e.g. with Ctrl+Shift+i | |
// 2. paste in console at Steam year in review page of your account: | |
// e.g. https://store.steampowered.com/yearinreview/...somethinghere../2023 | |
(function getSteamStats() { | |
const appConfigAttrs = document.querySelector("html.responsive body.v6.reactroot.responsive_page.movescrolltocontent div.responsive_page_frame.with_header div.responsive_page_content div#responsive_page_template_content.responsive_page_template_content div#application_config").attributes | |
const accId = JSON.parse(appConfigAttrs["data-userinfo"].value).accountid | |
const yearInReview = JSON.parse(appConfigAttrs[`data-yearinreview_${accId}_2023`].value) | |
const totalPlaytimeSeconds = yearInReview.playtime_stats.total_stats.total_playtime_seconds | |
console.log("Total play time in steam (hours):", totalPlaytimeSeconds / 3600) |
# syntax=docker/dockerfile:1 | |
FROM python:3.8-slim-buster | |
WORKDIR /app | |
ENV ACCEPT_EULA=Y | |
RUN apt-get update -y && apt-get update \ | |
&& apt-get install -y --no-install-recommends curl gcc g++ gnupg unixodbc-dev |
-- ddcavcontrol | |
-- v1.2.1 | |
-- This Hammerspoon script is intended to do the following: | |
-- 1) Control External Display Brightness via DDC (utilizing a proper brightness+contrast curve) | |
-- 2) Control External Display Volume via DDC | |
-- 3) Control Digital AV Volume via Network (currently works with Yamaha AVs) | |
-- 4) Use the standard brightness and volume keys of an Apple keyboards | |
-- 5) Display the standard MacOS OSD as expected |
... | |
headerView.translatesAutoresizingMaskIntoConstraints = false | |
tableView.tableHeaderView = headerView | |
NSLayoutConstraint.activate([ | |
headerView.topAnchor.constraint(equalTo: tableView.topAnchor), | |
headerView.widthAnchor.constraint(equalTo: tableView.widthAnchor), | |
headerView.centerXAnchor.constraint(equalTo: tableView.centerXAnchor)]) | |
tableView.tableHeaderView?.layoutIfNeeded() |
# Generate a BaseSystem.dmg with 10.13 Install Packages | |
hdiutil attach /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/highsierra | |
hdiutil create -o /tmp/HighSierraBase.cdr -size 7316m -layout SPUD -fs HFS+J | |
hdiutil attach /tmp/HighSierraBase.cdr.dmg -noverify -mountpoint /Volumes/install_build | |
asr restore -source /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase | |
cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation | |
hdiutil detach /Volumes/OS\ X\ Base\ System/ | |
hdiutil detach /Volumes/highsierra/ | |
mv /tmp/HighSierraBase.cdr.dmg /tmp/BaseSystem.dmg |
import hashlib as hash | |
# Specify how many bytes of the file you want to open at a time | |
BLOCKSIZE = 65536 | |
sha = hash.sha256() | |
with open('kali.iso', 'rb') as kali_file: | |
file_buffer = kali_file.read(BLOCKSIZE) | |
while len(file_buffer) > 0: | |
sha.update(file_buffer) |
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
# This is how I upload my new Sol Trader builds (http://soltrader.net) | |
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
S3KEY="my aws key" | |
S3SECRET="my aws secret" # pass these in | |
function putS3 | |
{ | |
path=$1 |
import requests | |
from boto.s3.connection import S3Connection | |
c = S3Connection(AWS_ACCESS_KEY, AWS_SECRET_KET) | |
data = 'file content' | |
filename = 'dir/name.txt' | |
bucket_name = 'your-bucket-name' | |
headers = {'Content-Type': 'text/plain'} |
#MongoDB 3.2.x Replica Sets on AWS EC2 A MongoDB replica set provides a mechanism to allow for a reliable database services. The basic replica set consists of three servers, a primary, a secondary and an arbitrator. The primary and secondary both hold a copy of the data. The arbitrator is normally a low spec server which just monitors the other servers and help with the failover process. In production, there can be more than three servers.
To setup mongo as a replica set on Amazon Web Services EC2 you need to first setup a security group with ssh on port 22 and mongodb on port 27017. You then need to create three servers. Select Ubuntu 14.04 LTS x64 and a micro (or bigger depending on your database size, ideally you should have enough memory to match your database size) instance for the primary and secondary and a nano instance for the arbitrator.
##Adjust the File System on each Server The operating system by default will update the last access time on a file. In a high data throughput database application