Skip to content

Instantly share code, notes, and snippets.

View ayyybe's full-sized avatar
🍋
life, lemons, etc.

Ibrahim Ahmed ayyybe

🍋
life, lemons, etc.
  • Bellingham, WA
View GitHub Profile
@brokenwindupdoll
brokenwindupdoll / adobe-hd.py
Last active August 4, 2020 20:20
A rough script to wrap Adobe HyperDrive apps into pkgs for easier use in Munki
#!/usr/bin/python
# A rough script to wrap Adobe HyperDrive apps into pkgs for easier use in Munki.
#
# Requires at least AUSST 4. You must sync updates to a locally accessible file system for this script to work.
#
# Does not import into Munki by itself. You will need to manually copy the plist and DMG files into a repository.
#
# The package installers that are created contain an optional "install" item to remove previous versions.
# The munkiRemoveOlderVersions switch will create an option override to run this on install.
@jorisguex
jorisguex / ccdl.command
Last active May 14, 2021 06:32 — forked from ayyybe/ccdl.command
Adobe Offline Package Generator v0.1.2 (macOS only)
#!/bin/bash
CYAN="$(tput bold; tput setaf 6)"
RESET="$(tput sgr0)"
clear
if command -v python3 > /dev/null 2>&1; then
if [ $(python3 -c "print('ye')") = "ye" ]; then
clear
@nevyn
nevyn / TollFreeBridgedCpp.mm
Created April 8, 2010 21:58
Transparent ObjC<>C++ bridge
/*
Say you have a largeish C++ class. You want to use it from ObjC. ObjC++ is painful;
C++ is painful. .mm files are bad. How about if we could just treat that C++
object as an ObjC object whenever it exits C++ land?
Apple already solved this problem once with toll free bridging. The tricky part is
vtables -- with a vtable, isa isn't at offset 0 of the memory layout of the object.
The code below is a work in progress to work around this.
*/
@XYShaoKang
XYShaoKang / 下载力扣提交中的代码.md
Last active December 23, 2023 03:48
下载力扣提交中的代码

下载力扣提交中时间分布图中的代码,下载的代码会按照[题目]-[语言].md进行命名 可配置项:

  • langs: 需要下载的语言 slug,可以设置多个语言,具体 slug 的值请查看最后面的 getAllLangs 函数中定义的语言 slug
  • questionSlugs: 需要下载代码的题目列表,可以设置多个题目
  • autoCreateSubmission: 是否开启自动创建提交 必须要有对应的提交,才能获取到时间或者内存分布的数据,如果没有提交,则无法获取 如果需要获取的题目中没有对应语言的提交,可以通过代码自动创建一个空提交 当然这样会弄乱提交记录.所以最好是开一个新的进度,或者开一个小号来进行操作
@TooTallNate
TooTallNate / .gitignore
Created July 9, 2011 04:05
low-level objc runtime apis
*
!*.m
!Makefile
@mbostock
mbostock / .block
Last active July 14, 2024 15:42
Collapsible Force Layout
license: gpl-3.0

Quick start

Tauri is shipped with state management function/feature by default.

Basic usage is quite simple: a variable of State type can be accessed on the tauri commands which you have defined; in other words, "with tauri commands, they'll magically inject state for you," so that once a variable is managed you can inject them directly as additional input when defining the command.

Example Implementation

@svoisen
svoisen / Of Mice and Men
Created March 21, 2013 19:16
Information on low-level scrolling events on Mac OS X
From the WebKit documentation at:
http://www.opensource.apple.com/source/WebKit/WebKit-7533.16/chromium/src/mac/WebInputEventFactory.mm
// Of Mice and Men
// ---------------
//
// There are three types of scroll data available on a scroll wheel CGEvent.
// Apple's documentation ([1]) is rather vague in their differences, and not
// terribly helpful in deciding which to use. This is what's really going on.
//
@aktau
aktau / imessage
Last active February 25, 2025 15:56
Send iMessage from the commandline
#!/bin/sh
if [ "$#" -eq 1 ]; then stdinmsg=$(cat); fi
exec <"$0" || exit; read v; read v; read v; exec /usr/bin/osascript - "$@" "$stdinmsg"; exit
-- another way of waiting until an app is running
on waitUntilRunning(appname, delaytime)
repeat until my appIsRunning(appname)
tell application "Messages" to close window 1
delay delaytime
end repeat
@rvega
rvega / main.cpp
Created April 9, 2018 02:07
Rendering video content with libvlc to an openGL texture.
#include <mutex>
#include <vlc/vlc.h>
#include <stb_image.h>
#include <nanogui/nanogui.h>
class VideoView: public nanogui::GLCanvas {
public:
nanogui::GLShader shader;
GLuint textureId;