Skip to content

Instantly share code, notes, and snippets.

View torives's full-sized avatar

Victor Yves Crispim torives

  • Rio de Janeiro, Brazil
  • 16:03 (UTC -03:00)
View GitHub Profile
@tranquan
tranquan / xcode-keybindings-as-vscode.md
Last active October 15, 2025 21:47
Xcode KeyBindings as VSCode
@davidsteppenbeck
davidsteppenbeck / PreviewProviderModifier.swift
Last active October 31, 2022 10:30
A SwiftUI view modifier for simple preview providers.
import SwiftUI
enum PreviewProviderMode: CaseIterable {
/// Use for a light appearance preview.
case lightMode
/// Use for a dark appearance preview.
case darkMode
@omaraboumrad
omaraboumrad / splitlogs.py
Created October 6, 2017 14:18
View docker-compose services logs in split tmux panes
# Requires pyyaml
import os
import yaml
run = os.system
new_window = lambda cmd: run('tmux new-window -n "logs" "{}"'.format(cmd))
split_vertical = lambda cmd: run('tmux split-window "{}"'.format(cmd))
split_horizontal = lambda cmd: run('tmux split-window -h "{}"'.format(cmd))
even_vertical = lambda: run('tmux select-layout even-vertical')
@stkent
stkent / android-bluetooth-low-energy-resources.md
Last active August 16, 2025 01:43
Android Bluetooth Low Energy (BLE) Resources
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active October 19, 2025 20:38
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@danieleggert
danieleggert / GPG and git on macOS.md
Last active October 2, 2025 21:19
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys
@samdmarshall
samdmarshall / Read Me
Last active January 17, 2018 13:49
Fat Static Library build script for iOS and OS X
This script is for generating a single static library out of iOS (device and sim) and OS X versions of the same code.
https://gist.github.com/samdmarshall/7516723
To use:
1. Create separate targets for each platform in xcode.
(The iOS device and simulator target can be the same one)
2. Add a new target of type "Mac" and "Aggregate". This can be found under "Other" in the target types list.
3. Add a new build phase to this target, "Add Run Script Phase to this Target"
4. Open Terminal.app, run this script, specifying the path to the output path of the build script
EX: ./BuildScriptGenerator.sh -o ~/Desktop
@rais38
rais38 / gist:5766980
Created June 12, 2013 16:35
Create patch from stash
git stash show -p stash@{0} > Stash0.patch
@robbyrussell
robbyrussell / ohmyzsh-dropbox-sync.sh
Created February 8, 2012 15:20
Keep your @ohmyzsh ~/.zshrc in sync via dropbox
# Was asked how I keep my zshrc config sync'd between my computers with Dropbox
# Add a new directory in your Dropbox (or use an existing one)
mkdir -p ~/Dropbox/ohmyzsh
# move existing file to Dropbox
mv ~/.zshrc ~/Dropbox/ohmyzsh/zshrc
# symlink file back to your local directory
ln -s ~/Dropbox/ohmyzsh/zshrc ~/.zshrc