Skip to content

Instantly share code, notes, and snippets.

View snowman's full-sized avatar
💭
I may be slow to respond.

snowman snowman

💭
I may be slow to respond.
View GitHub Profile
@snowman
snowman / count_messages.py
Created July 20, 2023 05:31 — forked from yi-jiayu/count_messages.py
Using Telethon and the Telegram API to count the number of messages in each of your recent conversations
View count_messages.py
from telethon import TelegramClient
from telethon.errors.rpc_errors_401 import SessionPasswordNeededError
# (1) Use your own values here
api_id = 17349
api_hash = '344583e45741c457fe1862106095a5eb'
phone = 'YOUR_NUMBER_HERE'
username = 'username'
@snowman
snowman / free-photoshop.md
Created June 11, 2023 03:12 — forked from molcik/free-photoshop.md
Modify Photoshop to never ending trial
View free-photoshop.md

How Does It Work

All you have to do, to extend your trial period, is change number in TrialKey element in application.xml. This file is located in /Library/Application Support/Adobe/Adobe Photoshop/AMT. You can navigate there with this command:

cd /Library/Application\ Support/Adobe/Adobe\ Photoshop\ */AMT

Then you have to open the file and edit it. You can use just TextEdit app.

open -a TextEdit application.xml
@snowman
snowman / SetWinStoreSetting.ps1
Created April 27, 2023 13:33 — forked from damirarh/SetWinStoreSetting.ps1
Function for changing a windows Store app setting directly in its settings.app file
View SetWinStoreSetting.ps1
function Set-WinStoreSetting {
param (
[Parameter(Mandatory=$true, Position=0)][string]$PackageName,
[Parameter(Mandatory=$true, Position=1)][string]$SettingName,
[Parameter(Mandatory=$true, Position=2)][string]$SettingValue
)
$settingsFile = [IO.Path]::Combine($env:LOCALAPPDATA, 'Packages', $PackageName, 'Settings\settings.dat')
# temporary paths
@snowman
snowman / markdown-details-collapsible.md
Created February 11, 2023 00:17 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.
View markdown-details-collapsible.md

How to

<details>
  <summary>Click me</summary>
  
  ### Heading
  1. Foo
  2. Bar
     * Baz
 * Qux
@snowman
snowman / export.json
Created January 14, 2023 16:17 — forked from trietptm/export.json
A huge JSON file containing all entries from here: http://crackmes.cf/archive/ , that will give you the ability to easily batch process the database! Happy Cracking :)
View export.json
This file has been truncated, but you can view the full file.
{
"1133": {
"url": "http://crackmes.cf/users/.nalet./nalets_crackme_no1/download/NaLeTcrkMe.zip",
"description": "First off don't give me that \"cr*pware\" things.\nYes, it's written in VB + P-Code, and all you need to do is find one serial.\nOh could someone rate it?!?",
"difficulty": 2,
"platform": "Windows",
"language": "(Visual) Basic",
"published": "2005-03-08T00:00:00",
"downloads": 1235,
"votes": 0
@snowman
snowman / uniquify-recentf.el
Created May 14, 2022 06:54 — forked from vedang/uniquify-recentf.el
Implements functionality similar to `uniquify' to make `recentf' results bearable.
View uniquify-recentf.el
(require 'recentf)
;; Implement functionality similar to uniquify to make recentf results bearable
;; Requires s.el and dash.el - awesome libraries from Magnar Sveen
;; Hat-tip : Baishampayan Ghose for the clojure implementation at
;; https://gist.github.com/ghoseb/8432086
(require 's)
(require 'dash)
@snowman
snowman / test-magit-stage-minimal.el
Created January 21, 2022 07:31 — forked from twlz0ne/test-magit-stage-minimal.el
Minimal configuration for testing magit stage #Emacs
View test-magit-stage-minimal.el
;;; Usage: /path/to/emacs -nw -Q -l /path/to/test-magit-stage-minimal.el --eval '(load-magit "/path/to/magit/lisp")'
;;; Created: 2020-03-04 03.05.24
;;; Updated: 2020-03-04 21.17.19
;;; Version: 2
(toggle-debug-on-error)
;; ------------------------------------------------------------------
;; elpa
@snowman
snowman / trial.key
Created August 4, 2021 09:10 — forked from huqi/trial.key
Beyond Compare 4 license for Mac
View trial.key
Beyond Compare 4
Licensed to: ASIO Allsoftinone
Quantity: 1 user
Serial number: 1822-9597
License type: Pro Edition for Windows
--- BEGIN LICENSE KEY ---
H1bJTd2SauPv5Garuaq0Ig43uqq5NJOEw94wxdZTpU-pFB9GmyPk677gJ
vC1Ro6sbAvKR4pVwtxdCfuoZDb6hJ5bVQKqlfihJfSYZt-xVrVU27+0Ja
hFbqTmYskatMTgPyjvv99CF2Te8ec+Ys2SPxyZAF0YwOCNOWmsyqN5y9t
@snowman
snowman / builder_example.js
Last active July 25, 2021 08:39 — forked from necccc/builder_example.js
Gist for Transform your codebase using codemods
View builder_example.js
// create a function call that looks like
// "myfunc(someVar, 'bar')"
const callExpr = j.callExpression(j.identifier("myFunc"), [
j.indentifier("someVar"),
j.literal("bar"),
]);
@snowman
snowman / switch_windows_with_same_process_name.ahk
Last active July 6, 2021 14:58
AutoHotkey - Switch windows with same process name
View switch_windows_with_same_process_name.ahk
#SingleInstance Force
#Persistent
DetectHiddenWindows, Off
;; Description
;;
;; This AutoHotkey script is to switch between different windows of the same process name.
;;
;; The checking algorithm is based on the app's process basename without path.