Skip to content

Instantly share code, notes, and snippets.

View Salakar's full-sized avatar
🎯
Darting around the place 24/7

Mike Diarmid Salakar

🎯
Darting around the place 24/7
View GitHub Profile
@JoeMatt
JoeMatt / Set Plist Bundle to Git Count.md
Last active November 25, 2023 10:18
Xcode 10 set Info.plist build version

Create Info.plist

About

This script will update Info.plist of a target in XCode with the following

  1. CFBundleVersion to the git commit count
  2. GitDate to the date of the last commit
  3. GitBranch to the current branch name
  4. GitTag to the latest tag on current branch

Creates a .version file to track last update and appease XCode needing a non-mutable output path.

@DoguD
DoguD / config.yml
Last active February 11, 2021 22:31 — forked from alexttransisland/gist:e8ebb98f769d31d7d0a0111550eb4bd8
Run Android emulator on CircleCI 2.0 macOS
version: 2
reference:
## Constants
gradle_cache_path: &gradle_cache_path
gradle_cache-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
workspace: &workspace
~/src
## Configurations
android_config: &android_config
working_directory: *workspace
@a-barbieri
a-barbieri / README.md
Last active June 6, 2021 21:48
NextJS sitemap generator with dynamic URL

NextJS sitemap generator

Install

The current setup has been tested on Next Js 7.0.0.

You need to install Axios.

$ npm install axios
@osopolar
osopolar / com.user.time-machine-exclude-node-modules-job.plist
Last active December 20, 2022 08:44 — forked from peterdemartini/command.sh
Exclude node_modules (and more) from timemachine, use launchd to scan the Project directory on a regular basis, for example meanwhile you are having siesta. Put this file in ~/Library/LaunchAgents and call `launchctl load ~/Library/LaunchAgents/com.user.time-machine-exclude-node-modules-job.plist`
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.user.time-machine-exclude-node-modules-job</string>
<key>RunAtLoad</key>
<false/>
<key>KeepAlive</key>
<false/>
@bmeck
bmeck / bus.js
Created June 23, 2018 13:51
it is a better API at least
// Example way to construct a Bus
//
// const ctrl = new SharedArrayBuffer(12);
// const size = new SharedArrayBuffer(4);
// let busSize = 4096;
// const data = new SharedArrayBuffer(busSize);
// const bufs = {ctrl,size,data,};
// const bus = new Bus(bufs);
'use strict';
@bmeck
bmeck / commands.js
Last active June 29, 2018 15:44
Show fs.readFile callback acting as if it was sync in another thread (naive impl)
module.exports = {
__proto__: null,
START: 0,
WORKER_READY: 2,
BUS_READY: 3,
BUS_DRAINED: 4,
BUS_END: 5,
WORKER_ERROR: 6,
};
platform :ios, '9.3'
target 'rentcssbeta' do
rn_path = '../node_modules/react-native'
pod 'react-native-maps', path: '../node_modules/react-native-maps'
pod 'RNFirebase', path: '../node_modules/react-native-firebase/ios'
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'Firebase/Crash'
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active August 8, 2025 01:13
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.

@EQuimper
EQuimper / clear.txt
Created June 16, 2017 16:17
React-Native clear Watchman + Cache
watchman watch-del-all && rm -rf node_modules/ && yarn cache clean && yarn install && yarn start -- --reset-cache
@brennanMKE
brennanMKE / app.js
Created June 6, 2017 18:11
React Native JS Bundle Source Mapping for Debugging
var sourceMap = require('source-map');
var convert = require('convert-source-map');
var fs = require('fs');
var source = 'PATH_TO_APP/Myapp.app/main.jsbundle';
var content = fs.readFileSync(source, 'utf8');
var json = convert.fromComment(content).toJSON();
var smc = new sourceMap.SourceMapConsumer(json);
var position = smc.originalPositionFor({