Skip to content

Instantly share code, notes, and snippets.

@jdhitsolutions
jdhitsolutions / Show-WeatherSummary.ps1
Created February 18, 2021 14:38
A PowerShell function that displays weather information using the wttr.in REST API.
#requires -version 5.1
<#
this must be run in a Windows Terminal or console session that supports the
emoji icons or use -Force if you know you are.
see https://github.com/chubin/wttr.in for API information
This command writes to the host not the PowerShell pipeline.
#>
# to be executed on the device itself
# note that ~/xochitl-data is a symlink to avoid long path
quickNotesLayersToWiki(){ cd xochitl-data; curl -d "?n=PIMVRdata.ReMarkableQuicknotes&text=$(grep name UUID/*json | sed 's/.*: "\(.*\)"/%0a* \1/' | tr '\n' ' ')&action=edit&post=1&author=reMarkable2Ttest&authpw=edit_pw_to_change" https://fabien.benetou.fr/PIMVRdata/ReMarkableQuicknotes; cd -; }
# note that you must replace UUID and edit_pw by the UUID of your quicknote document (you can use hashFromTitle() for that) and your PmWiki password respectively.
qrCodeLink () { qrencode http://`ip a | grep wlan0$ | sed "s/.* \(.*\)\/.*/\1/"`:3000/data/$1.pdf -o qr_ip.xpm -t XPM && convert qr_ip.xpm qr_ip.pdf && addPdfWithMetadata qr_ip.pdf; }
hashFromTitle () { cd ~/.local/share/remarkable/xochitl/ && grep -l -i $1 *metadata | sed 's/.metadata//'; }
addPdfWithMetadata(){
cp $1 ~/xochitl-data && echo "{'parent':'','type':'DocumentType','visibleName':'$1'}" | sed s/\'/\"/g > ~/xochitl-data/`echo $1 | sed "s/.pdf//"`.met
@kushagharahi
kushagharahi / .Slickdeals URL Cleaner.md
Last active June 4, 2024 12:17
Slickdeals URL Cleaner UserScript

Tired of having to go through referral/affiliate links before you can view a deal on Slickdeals? This script strips the urls on Slickdeals of referrers. If it can't strip the urls, it marks them as "Referral Link?" in hot pink.

Install this UserScript in GreaseMonkey or similar UserScript manager.

before and after script

Note: You must click View Forum Thread (requires login) ![image](https://user-images.githubusercontent.com/3326002/211234558-3e83f0b9-486f-4ab5-ae

@jensens
jensens / pyproject.toml
Created November 29, 2018 10:34
Plone style Black and Isort cfg
[tool.black]
line-length = 79
# skip-string-normalization = true
@nzec
nzec / README.MD
Last active May 31, 2024 02:02
DeezLoader Offical Page

Thanks to /u/zpoo32 for reporting several issues in this list!

Deemix

  • deemix: just the cli and the library
  • deemix-pyweb: the app with a GUI
  • deemix-server: just the server part of deemix-pyweb
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
#author: rex
#blog: http://iregex.org
#filename trie.py
#created: 2010-08-01 20:24
#source uri: http://iregex.org/blog/trie-in-python.html
# escape bug fix by fcicq @ 2012.8.19
#include <Windows.h>
#include "../../API/RainmeterAPI.h"
struct ACCENTPOLICY {
int nAccentState;
int nFlags;
int nColor;
int nAnimationId;
};
struct WINCOMPATTRDATA {
@Eklei
Eklei / Starbound Workshop Mod Loader
Last active April 5, 2022 20:57
This Python 3.0 script (courtesy of Dunto) finds any Starbound mods installed from the Steam workshop and adds them to the search path in sbinit.config.
#!/usr/bin/python
# From: http://community.playstarbound.com/threads/steam-workshop-mod-loader.119587/
# And: https://gist.github.com/Dunto/4f1396a784802bfbda12a029796c0f4b
# That was before Dunto sent this own valuable content into the memory hole.
# So here it is, back from the grave, because as I'm sure you know, the
# Internet interprets censorship as damage and routes around it.
# I have edited it to exclude workshop mod directories that are empty.
@alirobe
alirobe / reclaimWindows10.ps1
Last active July 3, 2024 09:36
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@tyleha
tyleha / gmail_heatmap.py
Created January 11, 2016 01:55
Unified code needed to build a heatmap of your email data.
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.dates as dates
import matplotlib.gridspec as gridspec
from datetime import timedelta, datetime, date
import GmailAccount # my package
gmail = GmailAccount(username='you@gmail.com', password=password)