Skip to content

Instantly share code, notes, and snippets.

View albertico's full-sized avatar

Alberto Colón Viera albertico

  • Washington, DC / Puerto Rico
View GitHub Profile
@arnaudsj
arnaudsj / chromeos-crosh-custom-setup.md
Created February 25, 2018 03:48 — forked from aaronhalford/chromeos-crosh-custom-setup.md
Customize ChromeOS Crosh Terminal with Custom Fonts and Solarized Dark Theme

Customize Chromebook Chrosh Shell Environment

Requirement: Chromebook, Common Sense, Commandline Ablity, 1 hour of time

Dear developers with a spare Chromebook lets inject a little personalization into your Crosh shell with custom fonts, the solarized theme, and extra secure shell options.

Also, keep in mind that the terms Chrosh, Chrosh Window, and Secure Shell all refer to various versions and extentions built around the ChromeOS terminal. Settings that affect the ChromeOS terminal are global.

Custom Fonts

@vramirez122000
vramirez122000 / GTFS Realtime Example Java
Created July 8, 2015 00:27
GTFS Realtime Example Java
import com.google.transit.realtime.GtfsRealtime;
import static com.google.transit.realtime.GtfsRealtime.*;
/**
* Created by victor on 2/07/15.
*/
public class EndpointMain {
@pixeltrix
pixeltrix / time_vs_datatime.md
Last active February 18, 2024 19:20
When should you use DateTime and when should you use Time?

When should you use DateTime and when should you use Time?

It's a common misconception that [William Shakespeare][1] and [Miguel de Cervantes][2] died on the same day in history - so much so that UNESCO named April 23 as [World Book Day because of this fact][3]. However because England hadn't yet adopted [Gregorian Calendar Reform][4] (and wouldn't until [1752][5]) their deaths are actually 10 days apart. Since Ruby's Time class implements a [proleptic Gregorian calendar][6] and has no concept of calendar reform then there's no way to express this. This is where DateTime steps in:

>> shakespeare = DateTime.iso8601('1616-04-23', Date::ENGLAND)
=> Tue, 23 Apr 1616 00:00:00 +0000
>> cervantes = DateTime.iso8601('1616-04-23', Date::ITALY)
=> Sat, 23 Apr 1616 00:00:00 +0000
@kevinelliott
kevinelliott / osx-10.10-setup.md
Last active December 1, 2023 08:21
Mac OS X 10.10 Yosemite Setup

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@subudeepak
subudeepak / WebSockets.md
Last active May 31, 2024 09:36
The problems and some security implications of websockets - Cross-site WebSockets Scripting (XSWS)

WebSockets - An Introduction

WebSockets is a modern HTML5 standard which makes communication between client and server a lot more simpler than ever. We are all familiar with the technology of sockets. Sockets have been fundamental to network communication for a long time but usually the communication over the browser has been restricted. The general restrictions

  • The server used to have a permanent listener while the client (aka browser) was not designated any fixed listener for a more long term connection. Hence, every communication was restricted to the client demanding and the server responding.
  • This meant that unless the client requested for a particular resource, the server was unable to push such a resource to the client.
  • This was detrimental since the client is then forced to check with the server at regular intervals. This meant a lot of libraries focused on optimizing asynchronous calls and identifying the response of asynchronous calls. Notably t
@nickstanish
nickstanish / timidity-setup
Created January 14, 2014 18:22
Setting up timidity for use with unimidi in ruby on a raspberry pi. Please read all of it before you proceed. This is the exact steps I took, but do so at your own risk.
> sudo apt-get install timidity
> sudo apt-get install fluid-soundfont-gm fluid-soundfont-gs
[edit] /etc/timidity/timidity.cfg for these changes
*************************************************************
## If you have a slow CPU, uncomment these:
opt EFresamp=d #disable resampling
opt EFvlpf=d #disable VLPF
opt EFreverb=d #disable reverb
-- This script includes examples for using AppleScript to perform several
-- useful tasks with Evernote.
-- Each section illustrates a chunk of Evernote's AppleScript interface,
-- and each section also cleans up after itself.
-- Please refer to the Evernote application's scripting dictionary for
@andreypronin
andreypronin / spec_features_samplefeature.rb
Last active July 6, 2016 19:42
A little spec library I use to test session/persistent cookies behavior in Rails apps with Capybara. Plus, example on how I use it. Implemented for Rack::Test and Poltergeist (PhantomJS) drivers only, as these are my default test preferences.
require 'spec_helper'
feature "Login" do
scenario "remembered user" do
password = "12345678"
user = create(:user, password: password)
access_protected_page_should_ask_to_login
current_path.should eq login_path
@benweint
benweint / gist:4370423
Last active December 10, 2015 02:48
Ruby Logger multi-process concurrency test
#!/usr/bin/env ruby
# Ruby Logger multi-process concurrency test.
# In an attempt to answer my own question at:
# http://stackoverflow.com/questions/13908745/can-rubys-stdlib-logger-class-safely-handle-writers-from-multiple-proceses
#
# Every line in each log file should begin with 'W,', and this string should
# appear in no other places in each line. To check results:
#
# grep -l '.W,' *.log