Skip to content

Instantly share code, notes, and snippets.

@bryanjswift
bryanjswift / UAgentInfo.java
Created March 1, 2010 09:43
User Agent detection in Java
/* *******************************************
// LICENSE INFORMATION
// The code, "Detecting Smartphones Using PHP"
// by Anthony Hand, is licensed under a Creative Commons
// Attribution 3.0 United States License.
//
// Updated 01 March 2010 by Bryan J Swift
// - Remove un-needed if statements instead just returning the boolean
// inside the if clause
//
@swallat
swallat / DarkMonokai.css
Last active May 7, 2024 11:29 — forked from Zren/DarkMonokai.qss
Dark Monokai - Quassel Theme (qss)
/**
** ____ _ ___ ___ _ _
** | _ \ | | | \/ | | | (_)
** | | \ |__ _ _ __| | __ | . . | ___ _ __ ___ | | __ __ _ _
** | | | | _` | '__| |/ / | |\/| |/ _ \| '_ \ / _ \| |/ // _` | |
** | |_/ /(_| | | | < | | | | (_) | | | | (_) | <| (_| | |
** |____/\__,_|_| |_|\_\ \_| |_/\___/|_| |_|\___/|_|\_\\__,_|_|
**
** Quassel Theme
**
@xyuanmu
xyuanmu / qqMusicSign.py
Last active May 7, 2024 11:27
Python版QQ音乐sign加密
#encoding = utf-8
import re
import base64
from hashlib import md5
headMap = [21, 4, 9, 26, 16, 20, 27, 30]
middleMap = [212, 45, 80, 68, 195, 163, 163, 203, 157, 220, 254, 91, 204, 79, 104, 6]
tailMap = [18, 11, 3, 2, 1, 7, 6, 25]
def sign(data):
@briglx
briglx / extract.py
Last active May 7, 2024 11:24
Extract Email from Outlook with Python
#!/usr/bin/python
"""Script to fetch email from outlook."""
import win32com.client
def extract(count):
"""Get emails from outlook."""
items = []
outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI")
inbox = outlook.GetDefaultFolder(6) # "6" refers to the inbox

README-tabbyAPI.md

Last changed: April 30, 2024

This gist collects changes to the official docker build of tabbyAPI and some additional files used to create a derived build suitable for RunPod.

@jatcwang
jatcwang / gist:ae3b7019f219b8cdc6798329108c9aee
Created February 2, 2017 23:44
List of all setxkbmap configuration options (including models/layout/etc)
! model
pc101 Generic 101-key PC
pc102 Generic 102-key (Intl) PC
pc104 Generic 104-key PC
pc105 Generic 105-key (Intl) PC
dell101 Dell 101-key PC
latitude Dell Latitude series laptop
dellm65 Dell Precision M65
everex Everex STEPnote
flexpro Keytronic FlexPro
@williamd1k0
williamd1k0 / EditorIconTexture.gd
Created May 6, 2024 23:46
Helper Texture class to use Godot Editor icons in plugins, such as main screen plugins.
@tool
class_name EditorIconTexture
extends AtlasTexture
var icon :String:
set(val):
icon = val
_update_icon.call_deferred()
func _init():
@rosmo
rosmo / c6_test.py
Created January 12, 2022 21:54
TP-Link X90 Deco API example
from requests.api import request
from Crypto.Cipher import PKCS1_OAEP, PKCS1_v1_5
from Crypto.Cipher import AES
from Crypto.PublicKey import RSA
from Crypto.Util.Padding import pad
from Crypto.Util.number import bytes_to_long
import base64
import requests
import string
import random
Maintainers:
opna2608: furnace, furnace, furnace, furnace