Skip to content

Instantly share code, notes, and snippets.

View gastonambrogi's full-sized avatar
🌱
Growing

Gastón Ambrogi gastonambrogi

🌱
Growing
  • Freelancer Frontend Developer
  • Buenos Aires, Argentina
  • 07:26 (UTC -03:00)
  • X @gastonambrogi
View GitHub Profile
  1. https://rubyinstaller.org/downloads/
  2. https://github.com/oneclick/rubyinstaller2/releases/download/rubyinstaller-2.5.3-1/rubyinstaller-devkit-2.5.3-1-x64.exe
  3. Install with DevKit (will run ridk)
  4. Select option 3
  5. ridk exec pacman -S mingw-w64-x86_64-sqlite3 mingw-w64-x86_64-libxslt mingw-w64-x86_64-libxml2
  6. gem install rails --no-ri --no-rdoc
  7. rails new APP. The installation will fail. So...
  8. Edit Gemfile
  9. Change gem sqlite to gem 'sqlite3', git: "https://github.com/larskanis/sqlite3-ruby", branch: "add-gemspec"
  10. cd APP
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gastonambrogi
gastonambrogi / SassMeister-input.scss
Last active January 14, 2019 14:26
Generated by SassMeister.com.
// ----
// Sass (v3.5.6)
// Compass (vundefined)
// ----
//Variables
$breakpoints: (
tablet: 768px,
desktop: 1024px
);
@gastonambrogi
gastonambrogi / gist:730af12ec6d0edb9d5c7b7a259f2dd60
Created November 6, 2018 17:18
Clear browser cache on 301 (permanent redirect)
I resolved this by opening dev tools (F12), click the "Preserve log" checkbox, and make the request that results in the cached 301. Right-click the request that results in the 301 and click "clear browser cache". Try again and then 301 should no-longer be cached.
@gastonambrogi
gastonambrogi / CameraPlugin-getFrameForCamera.st
Created August 1, 2018 23:17
Gets a frame from CameraPlugin Pharo package. It waits for the camera start, and returns the photo after waiting for a valid frame (that's not a blank frame.).
getFrameForCamera: camNum
| f n |
(self cameraIsOpen: camNum)
ifFalse: [ (self
openCamera: camNum
width: 640
height: 480)
ifNil: [ ^ self inform: 'no camera' ] ].
self waitForCameraStart: camNum.
(self frameExtent: camNum) x = 0
@gastonambrogi
gastonambrogi / i3.sh
Created July 17, 2018 14:36
i3wm on raspbian lite
#!/bin/bash
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install i3
sudo apt-get install xserver-xorg
sudo apt-get install xinit
sudo startx
@gastonambrogi
gastonambrogi / script.sh
Created July 2, 2018 13:29
Open all files with merge conflicts in Visual Studio Code
code `git diff --name-only --diff-filter=U | tr '\n' ' '`
@gastonambrogi
gastonambrogi / whiteboardCleaner.md
Created May 24, 2018 16:52 — forked from lelandbatey/whiteboardCleaner.md
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@gastonambrogi
gastonambrogi / installing_rubyinstaller.md
Last active March 16, 2018 04:34
RubyInstaller 2.4.3.2 on Windows 7
  • RubyInstaller 2.4.3.2
  • MSYS2> OPT:3
  • cmd> ridk exec pacman -S mingw-w64-x86_64-libxslt
  • gem install nokogiri --platform ruby -- --use-system-libraries
  • ridk exec pacman -S mingw-w64-x86_64-sqlite3
  • gem install sqlite3 --platform ruby
  • gem install bundler
  • gem install rails
  • cd app
  • Gemfile: gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] > gem 'tzinfo-data'