Skip to content

Instantly share code, notes, and snippets.

@dcode
dcode / GitHub Flavored Asciidoc (GFA).adoc
Last active April 20, 2024 13:55
Demo of some useful tips for using Asciidoc on GitHub

GitHub Flavored Asciidoc (GFA)

@OrionReed
OrionReed / dom3d.js
Last active April 20, 2024 13:54
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯

VIDEOS MIGHT OUTDATED BUT TEXT IS NOT

this guide is not meant to help with leaking or any stupid things you might do to ruin experience for other people

Downloading

  • Get latest version from Github Actions not releases from here , if you dont have account you can use site like nightly.link to download it , Latest build
  • Extract zip file somewhere
chrome_bBlpF4CYiz.webm.mov

@szaydel
szaydel / umask-setting-user.txt
Created February 17, 2016 14:17
AFP on OSX tuning system settings
It may be necessary at times to modify umask settings in order to allow for shared file access.
This sets the umask to 0022, but other variants are also possible, assuming it is a value unix umask value.
# sudo launchctl config user umask 022
@victornpb
victornpb / start_server.command
Last active April 20, 2024 13:52
Bash script to start Minecraft server and keep it running if it crashes
#!/bin/bash
# Config
WINDOW_TITLE="Minecraft Server"
ONLINE_AUTH=true
RAM_INITIAL=512M
RAM_MAX=4G
RESTART_DELAY=10
################################################################################

Sony Bravia HTTP API

The sony bravia has a HTTP API interacted with using a Pre-Shared key. There's a more complex auth flow but I've not described it here.

There wasn't any documentation, so I've written some. If you're a TV integrator don't read this, you'll laugh. I'm probably just getting confused by UPnP.

Disclaimer: I've only tested this on my TV, which is a KDL-50W829B. Your TV might not have all of the services; see Available services section for how to discover what your TV supports.

@dreikanter
dreikanter / encrypt_openssl.md
Last active April 20, 2024 13:45 — forked from crazybyte/encrypt_openssl.txt
File encryption using OpenSSL

Symmetic encryption

For symmetic encryption, you can use the following:

To encrypt:

openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt

To decrypt:

@idhowardgj94
idhowardgj94 / gcc.txt
Last active April 20, 2024 13:43
GCC 指令
```
轉自網路文章,原文已被刪除
```
email:pianopan@beeship.com
[版本] -0.13
[介紹]
gcc and g++分別是gnu的c & c++編譯器 gcc/g++在執行編譯工作的時候,總共需要4步
@dale3h
dale3h / jail.local
Created June 29, 2018 15:47
[fail2ban] Improved nginx-badbots
# Add to file: /etc/fail2ban/jail.local
[nginx-badbots]
enabled = true
port = http,https
filter = nginx-badbots
logpath = %(nginx_access_log)s
maxretry = 1
findtime = 604800
bantime = 604800
@ryanwinchester
ryanwinchester / keymap.jsonc
Created April 20, 2024 12:56
Zed keymap working on my vim stuff
[
// -----------------------------------------------------------------------
// Vim keybindings
// -----------------------------------------------------------------------
{
// NORMAL and VISUAL modes
"context": "Editor && (vim_mode == normal || vim_mode == visual) && !VimWaiting && !menu",
"bindings": {
// Tab things. Almost as good as harpoon.
"space 1": ["pane::ActivateItem", 0],