Skip to content

Instantly share code, notes, and snippets.

View YuriFontella's full-sized avatar
💭
sad dev

Yuri Fontella YuriFontella

💭
sad dev
  • Porto Alegre - RS
View GitHub Profile
@barnes7td
barnes7td / sublime_plugins.md
Created October 5, 2012 02:07
Sublime Plugins for Ruby and Rails

Sublime Plugins for Ruby and Rails

General

I would start by installing the Sublime Package Control manager. This tool will allow you to install the other plugins without having to clone git repositories and copying them to the correct folders. Instead you will the command drop-down menu with "Ctrl + Shift + P" and then scrolling down until you see "Package Control: Install Package". A search bar will pop up and you can type the name of a package, click on the name and it will self install. If you have problems setting any of these up email me at barnes7td@gmail.com

Packages/Plugins

  1. Sublime Package Control - Install this first. This tool will allow you to easily install most (if not all) the other plugins in this list. (Ctrl + Shift + P, then select Package Control: Install Package)

  2. SublimeERB - This plugin auto creates the erb tags. (<% %>, <%= %>, etc.) (Ctrl +

@rodyhaddad
rodyhaddad / timeago.filter.js
Created June 30, 2013 21:04
timeago filter for angularjs
.filter("timeago", function () {
//time: the time
//local: compared to what time? default: now
//raw: wheter you want in a format of "5 minutes ago", or "5 minutes"
return function (time, local, raw) {
if (!time) return "never";
if (!local) {
(local = Date.now())
}
@leommoore
leommoore / mongodb_basic_commands.md
Last active January 16, 2021 16:36
MongoDB - Basic Commands

#MongoDB - Basic Commands

##Saving Data

db  //Tells you the current database

show collections //Shows the collections available in the current db

db.foo.save({_id:1, x:10}) //Save the document into the foo collection  

db.bar.save({_id:1, x:10}) //Save the document into the bar collection

@thebucknerlife
thebucknerlife / authentication_with_bcrypt_in_rails_4.md
Last active July 10, 2024 00:17
Simple Authentication in Rail 4 Using Bcrypt

#Simple Authentication with Bcrypt

This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.

The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).

You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault

##Steps

@frankIT
frankIT / CompizLastRide.sh
Last active October 15, 2016 23:43
last ride with compiz: build it on debian jessie
#!/bin/bash
# http://wiki.compiz.org/C%2B%2BCompiling
# This is basically a script version of the official documentation above
# with a few fix needed to successfully compile on debian jessie
wget https://launchpad.net/compiz/0.9.10/0.9.10.0/+download/compiz-0.9.10.0.tar.bz2
tar -xf compiz-0.9.10.0.tar.bz2
rm compiz-0.9.10.0.tar.bz2
cd compiz-0.9.10.0/
@ruario
ruario / README.md
Last active January 7, 2023 20:52
Installs (or updates) PPAPI Flash, so that it can be used by Chromium-based browsers

Usage

If you use Ubuntu or a derivative distro, issue the following to install an appropriate version of Flash:

sudo add-apt-repository "deb http://archive.canonical.com/ubuntu `lsb_release -cs` partner" 
sudo apt update
sudo apt install adobe-flashplugin

If your distro does not provide a copy of Pepper Flash that works with Vivaldi, this script will download and install it for you. To use, click on the "Download ZIP" button listed on the GitHub Gist page and then unpack the .zip archive locally. You should now have a directory containing the file "latest-pepper-flash.sh".

anonymous
anonymous / index.html
Created March 6, 2015 16:54
vCard with fold-out links
<div class="vcard">
<div class="bio">
<img src="http://ianlunn.co.uk/wp-content/uploads/avatar.jpg" alt="Ian Lunn" />
<h1>Ian Lunn</h1>
<h2>Front End Developer</h2>
<p>Ian uses the latest web technologies to build creative and effective websites. Creator of open-source projects <a href="http://ianlunn.github.io/Hover/" target="_blank">Hover.css</a>, <a href="http://sequencejs.com/" target="_blank">Sequence.js</a>, and author of <a href="http://css3foundations.com/" target="_blank">CSS3 Foundations</a>.</p>
@azakordonets
azakordonets / encryptPassWordWithCryptoJs.js
Last active July 25, 2022 10:21
This gist describes how to encode password with salt using SHA256 algorithm. It shows how to do it with google crypto-js library and Node.js module crypto
var CryptoJS = require('crypto-js');
var algo = CryptoJS.algo.SHA256.create();
algo.update(password, 'utf-8');
algo.update(CryptoJS.SHA256(salt), 'utf-8');
var hash = algo.finalize().toString(CryptoJS.enc.Base64);
console.log(hash);
= Arch Linux step-by-step installation =
= http://blog.fabio.mancinelli.me/2012/12/28/Arch_Linux_on_BTRFS.html =
== Boot the installation CD ==
== Create partition ==
cfdisk /dev/sda
* Create a partition with code 8300 (Linux)
@james2doyle
james2doyle / vue.pretty-bytes.filter.js
Last active November 28, 2021 01:07
Vue.js pretty bytes filter. This filter formats bytes into human readable formats
// usage: {{ file.size | prettyBytes }}
Vue.filter('prettyBytes', function (num) {
// jacked from: https://github.com/sindresorhus/pretty-bytes
if (typeof num !== 'number' || isNaN(num)) {
throw new TypeError('Expected a number');
}
var exponent;
var unit;
var neg = num < 0;