Skip to content

Instantly share code, notes, and snippets.


Vinícius Sales viniciussbs

  • Rio de Janeiro, Brasil
View GitHub Profile
viniciussbs / sips: CR2 to jpeg
Created Nov 5, 2022 — forked from mayurah/sips: CR2 to jpeg
Mass convert CR2 (Raw Image File) to JPEG in macOS command-line.
View sips: CR2 to jpeg
# Mass convert CR2 (Raw Image File) to JPEG in macOS command-line.
mkdir Converted
for i in *.CR2; do sips -s format jpeg $i --out Converted/$i.jpg;done
viniciussbs / controllers.application\.js
Created May 24, 2020
each-in and tracked properties
View controllers.application\.js
import Controller from '@ember/controller';
import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
class Me {
tired = null
hungry = null
constructor(me) {
this.tired = me.tired;
View apollo-cache-shoebox.ts
import ApplicationInstance from '@ember/application/instance';
export function initialize(appInstance: ApplicationInstance): void {
const fastboot = appInstance.lookup('service:fastboot');
const apolloCache = appInstance.lookup('service:apollo').client.cache;
const shoebox = fastboot.get('shoebox');
if (fastboot.get('isFastBoot')) {
shoebox.put('apollo-cache', {
get cache(): unknown {
viniciussbs / ember-cli-build.js
Created Apr 6, 2020 — forked from vasind/ember-cli-build.js
Ember CLI performance improvements and tips
View ember-cli-build.js
// Credits to the following posts that helps me to reduce build times drastically
let EmberApp = require('ember-cli/lib/broccoli/ember-app');
let env = EmberApp.env(),
viniciussbs /
Created Nov 9, 2019 — forked from oznu/
How to Bootcamp / Dual Boot Windows 10 on a mid-2011 iMac using USB

How to Install / Bootcamp Windows 10 on a mid-2011 iMac using USB

Apple has released support for bootcamping Windows 10, but only on 2012 Macs and later. Despite not being supported. it is possible to install Windows 10 on earlier iMacs and it seems to run quite well.

IMPORTANT: Unplug all external and physical hard drives (where possible) that you won't be installing to to avoid accidentally erasing them. Also make note of which drives and partitions remain (e.g. System and Storage hard drives), and be super careful to not erase the wrong one.

RECOVERY: If you nuke your machine, restore your time machine backup. Instructions here.


viniciussbs / adauth.rb
Created Oct 20, 2018 — forked from boopathi/adauth.rb
Ruby AD Authentication
View adauth.rb
# Usage:
# user = ActiveDirectoryUser.authenticate('boopathi','password')
# user.first_name # => "Boopathi"
# user.flanderized_first_name # => "Boopathi Rajaa"
# user.groups # => ["Mac Users", "Geeks", "Ruby Coders", ... ]
require 'net/ldap' # gem install ruby-net-ldap
class ActiveDirectoryUser
viniciussbs /
Created Dec 8, 2017 — forked from rbishop/
A super simple Elixir server for sending Server Sent Events to the browser.

Generate a new Elixir project using mix and add cowboy and plug as dependencies in mix.exs:

  defp deps do
      {:cowboy, "~> 1.0.0"},
      {:plug, "~> 0.8.1"}
viniciussbs /
Created May 2, 2017 — forked from helfer/
Migrating from Apollo Client 0.x to 1.0

Migrating from Apollo Client 0.x to 1.0

Here are the main breaking changes between the 0.x and 1.0 versions of Apollo Client.


The structure of fetchMoreResult has been changed. Previously fetchMoreResult used to contain data and loading fields, now fetchMoreResult is what used to be. This means your updateQueries function has to change as follows:

updateQuery: (prev, { fetchMoreResult }) => {
View spacemacs-cheatsheet.txt
`emacs --daemon` to run in the background.
`emacsclient.emacs24 <filename/dirname>` to open in terminal
NOTE: "M-m and SPC can be used interchangeably".
* Undo - `C-/`
* Redo - `C-?`
* Change case: 1. Camel Case : `M-c`
2. Upper Case : `M-u`
3. Lower Case : `M-l`
View commit-message-style-guide.txt
A good commit message looks like this:
Header line: explaining the commit in one line
Body of commit message is a few lines of text, explaining things
in more detail, possibly giving some background about the issue
being fixed, etc etc.
The body of the commit message can be several paragraphs, and
please do proper word-wrap and keep columns shorter than about