Skip to content

Instantly share code, notes, and snippets.

View luckydonald's full-sized avatar
👀
294 people are currently looking at this profile

Luckydonald luckydonald

👀
294 people are currently looking at this profile
  • Some basement in Equestria.
View GitHub Profile
<html>
<head>
<title>Test</title>
<meta charset="utf-8" />
<meta name="apple-mobile-web-app-title" content="something" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, height=device-height">
<style>
@luckydonald
luckydonald / diff.patch
Created March 4, 2018 11:46 — forked from strazzere/diff.patch
rsakeyfinder
[35%]tstrazzere@bebop:[rsakeyfind] $ diff rsakeyfind.cpp-fixed rsakeyfind/rsakeyfind.cpp-original
colordiff 1.0.10 (http://colordiff.sourceforge.net/)
(C)2002-2012 Dave Ewart, davee@sungate.co.uk
4,5d3
<
< #include <unistd.h>
8a7
> #include <fcntl.h>
<?php
define('BOT_TOKEN', 'XXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX'); // place bot token of your bot here
function checkTelegramAuthorization($auth_data) {
$check_hash = $auth_data['hash'];
unset($auth_data['hash']);
$data_check_arr = [];
foreach ($auth_data as $key => $value) {
$data_check_arr[] = $key . '=' . $value;
@luckydonald
luckydonald / answer.md
Last active January 9, 2023 19:14
How to get the hostnames and informations of other hosts in the same docker scale grouping. http://stackoverflow.com/a/39895650/3423324

The way I could do it was by using the docker api. I used the docker-py package to access it.

The api exposes a labels dictionary for each container, and the keys com.docker.compose.container-number, com.docker.compose.project and com.docker.compose.service did what was needed to build the hostname.

The code below is a simplified for code I am now using. You can find my advanced code with caching and fancy stuff that at Github at luckydonald/pbft/dockerus.ServiceInfos (backup at gist.github.com).

@luckydonald
luckydonald / image_sizer.py
Last active January 18, 2022 19:21
A script to scale images to a monitor resulution and add the best fitting background color
"""
Makes border aware sizing of desktop wallpapers.
You need to install:
$ pip install Pillow easygui joblib
"""
import glob
import os
@luckydonald
luckydonald / utf8_javascript_decode
Created May 12, 2016 23:40
utf8 javascript decode
https://jsfiddle.net/wfr4tLku/0/ # http://stackoverflow.com/a/36949791/3423324
http://jsfiddle.net/Z9pQE/44/ # http://stackoverflow.com/a/17192845/3423324
http://jsfiddle.net/3VuLx/244/ # http://stackoverflow.com/a/22373135/3423324
@luckydonald
luckydonald / Api urls.md
Last active April 20, 2016 10:35 — forked from anonymous/Api urls
json api of several pages I encountered.

Prerequirements

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install apt-rdepends

Get the stuff needed for compiling

sudo apt-get install `apt-rdepends python3 | grep ^lib`
@luckydonald
luckydonald / Pipboy Protocol.md
Last active December 13, 2018 01:41
Fallout 4 Protocol description

luckydonald/JavaPipBoyServer/PROTOCOL.md Now summarizes this and other findings, and is generally more maintainend.

C Structs

struct Entry {
  uint8_t type;
  uint32_t id;
  switch (type) {
    case 0:
      uint8_t boolean;
Hier die Schritte zum Installieren/Compilieren:
0- Download
http://www.cygwin.com/
Download > Richtige Version (meist 64 Bit)
https://cygwin.com/setup-x86.exe
Dann kann schon mal mit SChritt (1) gestartet werden.
http://web.stanford.edu/group/radar/softwareandlinks/sw/snaphu/