Skip to content

Instantly share code, notes, and snippets.

@caiodv
caiodv / bootable-win-on-mac.md
Created November 2, 2024 21:50 — forked from acarril/bootable-win-on-mac.md
Create a bootable Windows USB using macOS

For some reason, it is surprisingly hard to create a bootable Windows USB using macOS. These are my steps for doing so, which have worked for me in macOS Monterey (12.6.1) for Windows 10 and 11. After following these steps, you should have a bootable Windows USB drive.

1. Download a Windows disc image (i.e. ISO file)

You can download Windows 10 or Windows 11 directly from Microsoft.

2. Identify your USB drive

After plugging the drive to your machine, identify the name of the USB device using diskutil list, which should return an output like the one below. In my case, the correct disk name is disk2.

@caiodv
caiodv / psd-to-css
Last active July 14, 2016 18:43
Generate a spritesheet from psd layers and export positions + size for css. must select all layers first, align them all together and trim the image, then run the script
// Save this file in Program Files\Adobe\Photoshop\Presets\Scripts\
// In PhotoShop CS5, run it by going menu File > SCripts > Browse > layersToSprite.js
if (documents.length > 0) {
// Adjust this to the number of columns you want
//leave -1 if you want it to calculate an optimal column value.
var doc = app.activeDocument;
var cols = -1;
@caiodv
caiodv / ae_marker_exporter.jsx
Last active April 27, 2016 21:25
Exports a json with all the markers in the selected compositions in After Effects. (exporting only the timestamp, but can be easily modified to export the others properties from the marker)
var jsonText = '{"markers":[';
var length = app.project.selection.length;
for(var i = 0; i < length;i++){
var activeItem = app.project.selection[i];
var tempNull = activeItem.layers.addNull(activeItem.duration);
var tempPos = tempNull.property("ADBE Transform Group").property("ADBE Position");
tempPos.expression = "x = thisComp.marker.numKeys;[x,0];";
var result = tempPos.value[0];
@caiodv
caiodv / select_log.coffee
Created August 13, 2015 20:53
Custom command to log a selected text in Atom.io (must be included in the init.coffee file)
atom.commands.add 'atom-workspace', 'custom:select_log', ->
editor = atom.workspace.getActiveTextEditor()
text = editor.getSelectedText()
editor.moveToEndOfLine()
editor.insertText("\nconsole.log('#{text}:', #{text})")
@caiodv
caiodv / bezierJsonExporter
Created May 20, 2015 20:04
Exports Illustrator bezier curves to JSON
main();
function main(){
var doc = app.activeDocument;
jsonText = '{"paths":['
for(var i=0;i<doc.pathItems.length;i++){
var _path = doc.pathItems[i];
var _points = _path.pathPoints;
@caiodv
caiodv / pathPointExporter.jsx
Created April 1, 2015 15:56
Saves all Illustrator paths points in a document to json.
main();
function main(){
var doc = app.activeDocument;
jsonText = '{"paths":['
for(var i=0;i<doc.pathItems.length;i++){
var _path = doc.pathItems[i];
var _points = _path.pathPoints;