Skip to content

Instantly share code, notes, and snippets.

@guiambros
guiambros / gist:4187670
Created December 2, 2012 08:03
Synology DS212+ Serial Console Boot
__ __ _ _
| \/ | __ _ _ ____ _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| | | | (_| | | \ V / __/ | |
|_| |_|\__,_|_| \_/ \___|_|_|
_ _ ____ _
| | | | | __ ) ___ ___ | |_
| | | |___| _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
\___/ |____/ \___/ \___/ \__| ** LOADER **
@guiambros
guiambros / correct_password.c
Created December 8, 2012 21:51
Synology's password
/* vi: set sw=4 ts=4: */
/*
* Copyright 1989 - 1991, Julianne Frances Haugh <jockgrrl@austin.rr.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
@guiambros
guiambros / pong.py
Created March 16, 2023 01:59
Pong game created by GPT-4
import pygame
import sys
import random
pygame.init()
# Constants
WIDTH, HEIGHT = 800, 600
PADDLE_WIDTH, PADDLE_HEIGHT = 20, 100
BALL_SIZE = 20
@guiambros
guiambros / .XCompose
Last active September 26, 2022 18:15
.XCompose
#-#-#-#-#-#-#-#
# ~/.XCompose
# To change the US International keyboard layout to behave like the
# Microsoft Windows (TM) version of the layout
# version: 0.2 edit 6 (20110403-6)
# by @tamh [48bytes at gmail com]
#
# Released under LGPL v2.1. Please refer to it by going to:
# <http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html>
--- up-device.c 2021-07-18 00:27:11.329004126 -0400
+++ up-device-silent.c 2021-07-18 00:27:51.785006055 -0400
@@ -63,6 +63,15 @@
UpDeviceLevel warning_level, battery_level;
UpExportedDevice *skeleton = UP_EXPORTED_DEVICE (device);
+ /* Disable warning notifications for wireless mice with rechargeable batteries */
+ int type = up_exported_device_get_type_ (skeleton);
+ int state = up_exported_device_get_state(skeleton);
+ if (type == UP_DEVICE_KIND_MOUSE && state == UP_DEVICE_STATE_DISCHARGING) {
@guiambros
guiambros / cloud-init.sh
Created October 22, 2012 01:29
Cloud-Init.sh - Amazon EC2 initial instance setup script (tested with Ubuntu 12.04 LTS)
#!/bin/bash
function getpublickey()
{
x=$(curl -fs http://169.254.169.254/latest/meta-data/public-keys/)
if [ $? -eq 0 ]; then
for i in $x; do
index=$(echo $i|cut -d = -f 1)
format=$(curl -s http://169.254.169.254/latest/meta-data/public-keys/$index/)
echo $(curl -s http://169.254.169.254/latest/meta-data/public-keys/$index/$format)
8 11 6 3 5 5 3 4 1 5 0 9 8 4 8 1 8 1 4 1 9 3 2 1 3 2 1 7 0 11 5 8 9 6 4 1 7 1 3 5 3 1 2 1 3 1 1 2 1 7 0 11 1 4 6 8 2 1 1 8 4 2 9 3 2 1 1 2 3 1 4 3 1 5 3 6 1 8 0 6 5 1 8 1 8 8 3 3 2 1 2 1 3 1 1 6 0 10 3 6 1 7 4 8 4 4 9 1 2 1 3 1 1 2 1 5 0 11 4 5 9 7 2 3 6 1 1 5 6 1 2 1 2 2 1 1 1 2 2 4 3 7 1 6 0 10 9 4 8 4 1 5 6 4 7 6 2 1 1 1 2 3 1 6 0 8 3 9 1 1 9 1 1 7 2 1 3 2 1 3 1 6 0 9 1 2 2 3 1 5 2 1 1 1 3 1 2 3 3 3 2 1 3 3 2 4 3 4 1 5 0 10 8 3 3 6 4 8 5 6 1 9 1 2 1 3 1 1 8 0 11 2 1 2 1 6 8 2 2 2 2 4 1 3 3 1 2 1 2 1 1 6 0 9 8 1 8 2 8 3 5 1 1 3 1 2 3 1 1 4 2 2 2 3 5 1 5 0 6 6 9 1 1 4 3 3 3 2 1 1 1 6 0 11 1 6 1 7 9 6 9 1 5 5 1 2 1 1 2 2 3 1 8 0 11 9 2 1 6 5 5 8 1 7 6 8 3 3 3 2 3 1 1 2 2 2 3 2 4 2 1 7 3 7 5 4 3 7 1 6 0 8 5 4 2 3 4 3 1 5 3 1 2 2 3 3 1 7 0 10 7 1 8 1 9 8 1 5 6 7 3 3 1 2 2 2 3 1 9 0 8 7 2 1 1 4 2 6 7 3 1 1 3 1 1 1 1 1 5 2 2 5 3 2 1 3 6 1 9 0 7 6 1 1 1 9 8 5 3 1 3 1 3 2 3 3 1 1 6 0 7 7 1 8 7 1 2 9 3 1 1 2 2 3 1 5 0 10 3 2 1 7 9 8 4 7 8 6 1 3 1 1 1 3 4 1 1 2 3 3 4 1 8 0 11 8 8 5 1 6 4 7 5 3 3 4 1 1 1 2 3 3 3 2 1 8
Step C must be finished before step P can begin.
Step V must be finished before step Q can begin.
Step T must be finished before step X can begin.
Step B must be finished before step U can begin.
Step Z must be finished before step O can begin.
Step P must be finished before step I can begin.
Step D must be finished before step G can begin.
Step A must be finished before step Y can begin.
Step R must be finished before step O can begin.
Step J must be finished before step E can begin.
108, 324
46, 91
356, 216
209, 169
170, 331
332, 215
217, 104
75, 153
110, 207
185, 102
wUuXxrRbeEaAuUMmJUuXxvoFfMmOTjJmMtVvmMVWpdDPwGgAalVvLKkNmlAaLMnpGgeEcCcCBbpPPHmpzZPAaPQqkKMSsmuUpJjMPpNnhHhJjrRpIyYBbbBiMmPxXMgGsBbSmxihHIXIijAaKkZfxoOXFUunNntTNzFZrhCTtSshHcHhHRlLVvrPpsSiNaAvTtmMVIiYyrhpPHRUvhHVunIXxHhaBbAewWEsSrYyOpPlLoxzZoOiIZzXYFJCcQqjxXfNJjNOonnDcCddDbFlbBLfByRNnRMmXzZMeEiIUpPEeuRrGgHhMmlLqyYQlzHhZMmztTZLrRtTkiIoOZzKmbBeEvVLlxPpXWwcCxmMYTtyIixXdjJDHsSPphHzZBbkKrYyRhWMmiIwssSRuUrPCnNcpSWZzLlQqwsFCcNnbAaBfOPpVTtviIoCcZXxTTttzjVvrRJRuUbBUuYSsyLlrSZzMWgGDdYywFzZfkuUvVKdDllvxXVXxTtEeEeJjfnQoOpPOYJjyQqoqNFwWAzuUdAaDHmMhZaflLFmuUMBolUuLhHvWWwwIikwWKVFdnNDYyvV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