Skip to content

Instantly share code, notes, and snippets.

@macshome
macshome / EnvironmentVariables.swift
Created May 2, 2024 12:48
A playground to see different ways to get environment variables in Swift
import Foundation
// A playground to see different ways to get environment variables in Swift
// Foundation is the easiest way using the awesome ProcessInfo class.
// Get all of the environment variables for your running process in a Dictionary.
let foundationEnv = ProcessInfo().environment
print("********** ProcessInfo Environment **********")
@blessanm86
blessanm86 / german-driving-license.md
Last active May 3, 2024 15:15
Quick Ref Notes for German Driving License Test

This is unmaintained and was created for personal use. As I passed the exam I have no use to keep this up to date. Feel free to fork

What are the consequences for a person driving a motor vehicle under the influence of drugs (e.g. hashish, heroin, cocaine)?

[x] Confiscation of driving licence or driving ban
[x] Compulsory medical/psychological examination
[x] Fine and/or imprisonment

In which instances do you have to approach a pedestrian crossing with particular care?

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 3, 2024 15:15
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@mo124679
mo124679 / RosaryApp.java
Created May 3, 2024 15:13
The Rosary (Counting) application is primitive and is being developed
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class RosaryApp {
private JFrame frame;
private JButton countButton;
private JLabel countLabel;
private int count = 0;
<?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;
@christiangenco
christiangenco / download website assets
Created January 20, 2014 23:23
Use wget to download a website's assets, including images, css, javascript, and html. From http://www.linuxjournal.com/content/downloading-entire-web-site-wget
$ wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--domains website.org \
--no-parent \
www.website.org/tutorials/html/
@3rogue
3rogue / 163_lyric_download.js
Last active May 3, 2024 15:11
网易云音乐歌词下载(双语喔)
// ==UserScript==
// @name 网易云歌词下载,可以双语了orz
// @namespace http://suselinks.us
// @description 我只是做了合并了两个脚本的工作,可以直接下载了。
// @description 脚本1:https://greasyfork.org/zh-CN/scripts/10548-%E7%BD%91%E6%98%93%E4%BA%91%E9%9F%B3%E4%B9%90%E4%B8%8B%E8%BD%BD
// @description 脚本2:https://gist.github.com/anonymous/a800677393bbb2dd113a 多谢他们
// @include http://music.163.com/*
// @grant none
// @version 1.2
// ==/UserScript==
@OsoPanda1
OsoPanda1 / gban.py
Last active May 3, 2024 15:10
Gban for Telegram
'fban_gbanimport asyncio
from telethon.tl.types import MessageEntityMentionName
from userbot import CMD_HELP, bot, is_mongo_alive, is_redis_alive
from userbot.events import register
from userbot.modules.dbhelper import (add_chat_fban, add_chat_gban, get_fban,
get_gban, remove_chat_fban,
remove_chat_gban)
@andrei-yapily
andrei-yapily / pojo_to_yaml.py
Created May 3, 2024 14:59
This Python script converts Plain Old Java Object (POJO) strings into YAML models following the OpenAPI Specification format. It supports parsing POJOs with properties of primitive types, nested objects, arrays, and enum classes.
import re
import yaml
from typing import Dict, Any
def pojo_to_yaml(pojo_str: str) -> Dict[str, Any]:
"""
Convert a POJO (Plain Old Java Object) string to a YAML model.
Args: