Skip to content

Instantly share code, notes, and snippets.

View barcellos's full-sized avatar

Fernando Barcellos barcellos

View GitHub Profile
@barcellos
barcellos / macos-ramdisk.md
Created April 28, 2021 03:20 — forked from htr3n/macos-ramdisk.md
Creating RAM disk in macOS

Built-in

diskutil erasevolume HFS+ 'RAM Disk' `hdiutil attach -nobrowse -nomount ram://XXXXX`

where XXXXX is the size of the RAM disk in terms of memory blocks.

Notes:

@barcellos
barcellos / gist:65a9520aa09265baf7b9437e57be5ef8
Last active March 31, 2019 06:21 — forked from steipete/ios-xcode-device-support.sh
Using iOS 12.2 devices with Xcode 10.1
// The trick is to link the DeviceSupport folder from the beta to the stable version.
// Updated on Mar 31th, 2019 for Xcode 10.2
ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/12.2\ \(16E226\) /Applications/Xcode_10.1.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
// Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions
// sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :)
@barcellos
barcellos / build.xml
Created January 3, 2019 03:42 — forked from mattandneil/build.xml
Salesforce Org Snapshot - Ant Script
<macrodef name="snapshot" description="Snapshots all metadata in an organization - Revision 21">
<attribute name="username" />
<attribute name="password" />
<attribute name="serverurl" default="https://login.salesforce.com" />
<attribute name="outPath" default="temp/snapshot" description="Directory to write snapshot." />
<sequential>
<!-- prompt user to confirm -->
@barcellos
barcellos / build.xml
Created January 3, 2019 03:41 — forked from mattandneil/build.xml
Salesforce Execute Anonymous - Ant Script
<macrodef name="execanon" description="Executes apex code in an organization - Revision 7">
<text name="apexcode" />
<attribute name="username" />
<attribute name="password" />
<attribute name="serverurl" default="https://login.salesforce.com" />
<attribute name="apiVersion" default="44.0" />
<sequential>
@barcellos
barcellos / build.xml
Created January 3, 2019 03:40
Salesforce Organization Destroy - Ant Script
<macrodef name="destroy" description="Destroys all metadata in an organization - Revision 23">
<attribute name="username" />
<attribute name="password" />
<attribute name="serverurl" default="https://login.salesforce.com" />
<attribute name="tempDir" default="temp/destroy" description="Directory to write metadata." />
<attribute name="apiVersion" default="43.0" />
<sequential>
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'