Skip to content

Instantly share code, notes, and snippets.

View Gruppio's full-sized avatar

Michele Gruppioni Gruppio

View GitHub Profile
@Gruppio
Gruppio / ffmpeg-install.sh
Created October 14, 2021 07:59 — forked from clayton/ffmpeg-install.sh
Install FFMPEG on OS X with HomeBrew to convert Mp4 to WebM
# Installation
brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid
# Easy Peasy
ffmpeg -i video.mp4 video.webm
@Gruppio
Gruppio / duplicate_xcode_project_target.rb
Created April 1, 2020 19:46 — forked from ratazzi/duplicate_xcode_project_target.rb
Duplicate Xcode Project Target with Ruby
#!/usr/bin/env ruby
require 'rubygems'
require 'xcodeproj'
name = 'test_copy'
proj = Xcodeproj::Project.open('test.xcodeproj')
src_target = proj.targets.find { |item| item.to_s == 'test' }
@Gruppio
Gruppio / My Touchbar My Rules
Last active October 13, 2019 16:46
My ~/Library/Application\ Support/MTMR/items.json
[
{
"type": "escape",
"width": 64,
"align": "left"
},
{
"type": "exitTouchbar",
"align": "left",
"image": {
@Gruppio
Gruppio / Gruppio.xccolortheme
Created August 4, 2019 21:08
Gruppio XCode color theme, Paste it in ~/Library/Developer/Xcode/UserData/FontAndColorThemes/Gruppio.xccolortheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>1 1 1 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>SFMono-Regular - 12.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>1 1 1 1</string>
@Gruppio
Gruppio / RedBubbleDownloader.sh
Created November 10, 2018 11:53
Downloads images from RedBubble.com with a dimension of 512x512 and black background
#!/bin/bash
# Pass as parameter a redbubble image link like https://ih1.redbubble.net/image.379381203.9755/st%2Csmall%2C420x460-pad%2C420x460%2Cf8f8f8.lite-1u2.jpg
url="$1"
newUrl=${url//420/512}
newUrl=${newUrl//460/512}
newUrl=${newUrl//f8/00}
curl "$newUrl" > "$(uuidgen).jpg"
@Gruppio
Gruppio / AdvancedDebuggingTipsAndTricksNotes.md
Last active November 2, 2018 09:24
Advanced debugging with xcode and LLDB - WWDC 2018 - 412 Video Notes

Advanced Debugging Tips And Tricks

  • Configure behaviors to dedicate a tab for debugging
  • LLDB expressions can modify program state
  • Use auto-continuing breakpoints with debugger commands to inject code live Create dependent breakpoints using breakpoint set * --one-shot true
  • po $arg1 ($arg2, etc) in assembly frames to print function arguments
  • Skip lines of code by dragging Instruction Pointer or thread jump --by 1 Pause when variables are modified by using watchpoints
  • Evaluate Obj-C code in Swift frames with expression -l objc -O -- <expr>
  • Flush view changes to the screen using expression CATransaction.flush()
  • Add custom LLDB commands using aliases and scripts. Alias examples: