Skip to content

Instantly share code, notes, and snippets.

View viniciussbs's full-sized avatar

Vinícius Sales viniciussbs

  • Rio de Janeiro, Brasil
View GitHub Profile
@viniciussbs
viniciussbs / sips: CR2 to jpeg
Created November 5, 2022 17:46 — forked from mayurah/sips: CR2 to jpeg
Mass convert CR2 (Raw Image File) to JPEG in macOS command-line.
# 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
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
viniciussbs / ember-cli-build.js
Created April 6, 2020 14:09 — forked from vasind/ember-cli-build.js
Ember CLI performance improvements and tips
// Credits to the following posts that helps me to reduce build times drastically
// https://discuss.emberjs.com/t/tips-for-improving-build-time-of-large-apps/15008/12
// https://www.gokatz.me/blog/how-we-cut-down-our-ember-build-time/
//ember-cli-build.js
let EmberApp = require('ember-cli/lib/broccoli/ember-app');
let env = EmberApp.env(),
@viniciussbs
viniciussbs / README.md
Created November 9, 2019 14:37 — forked from oznu/README.md
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.

Requirements

@viniciussbs
viniciussbs / adauth.rb
Created October 20, 2018 16:29 — forked from boopathi/adauth.rb
Ruby AD Authentication
# 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
### BEGIN CONFIGURATION ###
@viniciussbs
viniciussbs / README.md
Created December 8, 2017 13:55 — forked from rbishop/README.md
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"}
    ]
  end
@viniciussbs
viniciussbs / apollo-1-migration.md
Created May 2, 2017 21:03 — forked from helfer/apollo-1-migration.md
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.

fetchMore

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

updateQuery: (prev, { fetchMoreResult }) => {
@viniciussbs
viniciussbs / spacemacs-cheatsheet.txt
Created February 20, 2017 12:17 — forked from davoclavo/spacemacs-cheatsheet.md
Spacemacs cheatsheet
`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`
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

A proposal for a framework-agnostic way of building Javascript configuration objects based on different environments.

This proposal focuses on the conventions that will allow for the creation of a plain old JavaScript object. For example:

var environment = new Environment("development");
environment.name; // "development"
environment.config.API_ROOT; // "http://localhost:3000/"