Skip to content

Instantly share code, notes, and snippets.

@okkann
okkann / gist:b330d1cf7211af09fefb843fdec96197
Created July 5, 2024 19:49 — forked from cranelab/gist:940d76283414908b464074dba1aaa7af
all wp plugins with over 100+ active installations
5,000,000+ : wpforms-lite
5,000,000+ : wordpress-seo
5,000,000+ : woocommerce
5,000,000+ : really-simple-ssl
5,000,000+ : jetpack
5,000,000+ : elementor
5,000,000+ : contact-form-7
5,000,000+ : classic-editor
5,000,000+ : akismet
4,000,000+ : wordpress-importer
#!/usr/bin/env xcrun swift
import Foundation
let kDelayUSec : useconds_t = 500_000
func DragMouse(from p0: CGPoint, to p1: CGPoint) {
let mouseDown = CGEventCreateMouseEvent(nil, .LeftMouseDown, p0, .Left)
let mouseDrag = CGEventCreateMouseEvent(nil, .LeftMouseDragged, p1, .Left)
let mouseUp = CGEventCreateMouseEvent(nil, .LeftMouseUp, p1, .Left)
@okkann
okkann / vimeo-downloader.js
Created May 8, 2023 09:23 — forked from mistic100/vimeo-downloader.js
Download video from Vimeo (chopped m4s files)
// 1. Open the browser developper console on the network tab
// 2. Start the video
// 3. In the dev tab, locate the load of the "master.json" file, copy its full URL
// 4. Run: node vimeo-downloader.js "<URL>"
// 5. Combine the m4v and m4a files with mkvmerge
const fs = require('fs');
const url = require('url');
const https = require('https');
Advanced Animations with UIKit
video: https://devstreaming-cdn.apple.com/videos/wwdc/2017/230lc4n1loob9/230/230_hd_advanced_animations_with_uikit.mp4?dl=1
pdf: https://devstreaming-cdn.apple.com/videos/wwdc/2017/230lc4n1loob9/230/230_advanced_animations_with_uikit.pdf
Advanced Touch Bar
video: https://devstreaming-cdn.apple.com/videos/wwdc/2017/222ijxk2akkrebmr/222/222_hd_advanced_touch_bar.mp4?dl=1
pdf: https://devstreaming-cdn.apple.com/videos/wwdc/2017/222ijxk2akkrebmr/222/222_advanced_touch_bar.pdf
Advances in TVMLKit
video: https://devstreaming-cdn.apple.com/videos/wwdc/2017/202ximbb9e2dq222/202/202_hd_advances_in_tvmlkit.mp4?dl=1
@okkann
okkann / gist:5cf0063f500a7c5027f6644fcd26aae2
Created September 22, 2022 06:04 — forked from christofluethi/gist:646ae60d797a46a706a5
Convert m4a to mp3 on OS X command line using ffmpeg
brew update
brew link yasm
brew link x264
brew link lame
brew link xvid
brew install ffmpeg
ffmpeg wiki:
https://trac.ffmpeg.org/wiki/Encode/MP3
@okkann
okkann / current-date-and-time.applescript
Created May 7, 2022 10:35 — forked from Glutexo/current-date-and-time.applescript
AppleScript to get current date and time (YYYY-MM-DD HH:MM:SS). Usable as a Text Service in Mac OS X.
(*
The zero_pad function taken from:
http://www.nineboxes.net/2009/10/an-applescript-function-to-zero-pad-integers/
*)
on zero_pad(value, string_length)
set string_zeroes to ""
set digits_to_pad to string_length - (length of (value as string))
if digits_to_pad > 0 then
repeat digits_to_pad times
set string_zeroes to string_zeroes & "0" as string
@okkann
okkann / jerry.swift
Created May 6, 2022 07:29 — forked from vorce/jerry.swift
Mouse move and click test thing for macos in swift
import Cocoa
import Foundation
// Move around and click automatically at random places in macos, kinda human like in a cheap way.
// Moves the mouse pointer to `moves` random locations on the screen and runs the `action` function at
// each point with the point as argument.
func mouseMoveWithAction(moves: Int, action: (CGPoint) -> Void = defaultAction) {
let screenSize = NSScreen.main?.visibleFrame.size
@okkann
okkann / example.cpp
Created February 15, 2022 17:57 — forked from zekroTJA/example.cpp
Simple C++ asynchronous timer class
/*
COPYRIGHT © 2018 Ringo Hoffmann (zekro Development)
READ BEFORE USING: https://zekro.de/policy
*/
#include "timer.h"
using namespace std;
@okkann
okkann / AdbCommands
Created May 15, 2021 18:24 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@okkann
okkann / gist:a745f86fb67ff93b63578b73fd042e50
Created April 12, 2021 12:31 — forked from McFunkypants/gist:87f07ac5e8affad34391
Sid Meier's 10 Rules of Game Design
Sid Meier's 10 Rules of Game Design
1. Choose a topic you have a passion for. Game Design is about creativity.
2. Do research after the game is done. Tap into the player’s brain.
3. Define your axioms, refine your axioms. Prototype, prototype, prototype; sit in all the chairs.
4. Double it or cut it in half. You are more wrong than you think.