Skip to content

Instantly share code, notes, and snippets.

View yohann's full-sized avatar
💭
Ruby, Usually on Rails

Yohann Candido yohann

💭
Ruby, Usually on Rails
  • Western Governors University
  • Salt Lake City, UT
  • 00:08 (UTC -06:00)
  • LinkedIn in/yohann-candido
View GitHub Profile
@mendes5
mendes5 / The Virus - Part 2.java
Last active August 8, 2018 18:02
An virus i received by e-mail, reserved for further analysis
import java.lang.reflect.*;
import java.lang.invoke.*;
public class b
{
private static final Object[] a;
private static final String[] b;
private static final String[] c;
private static final String[] d;
@mendes5
mendes5 / a.java
Created August 1, 2018 20:03
The Virus - Part 1
import java.io.*;
import java.net.*;
import java.nio.file.*;
import java.util.*;
public class a
{
private static String c;
public static int b;
public static boolean d;
@gunesmes
gunesmes / capybara_dockerfile
Last active February 22, 2019 14:40
Docker helps you to run your test isolated. If you are using Capybara with Cucumber, tagging is a very efficient feature of the Cucumber for manageable test cases. Tagging can be also used for managing test environment, like @test may mean that these tests run only in the test environment so set the environment as the test for me. Likely @LiVe m…
FROM ruby:2.3
ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN true
# Set timezone
RUN echo "US/Eastern" > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata
RUN apt-get update -y && \
apt-get install -y unzip xvfb \
@codediodeio
codediodeio / auth.service.ts
Created May 8, 2017 16:41
Angular4 Firebase authentication service using OAuth, Anonymous, and Email/Password. Designed specifically for changes introduced in AngularFire2 4.0.0
import { Injectable } from '@angular/core';
import { AngularFireDatabaseModule, AngularFireDatabase, FirebaseListObservable } from 'angularfire2/database';
import { AngularFireAuth } from 'angularfire2/auth';
import { Router } from "@angular/router";
import * as firebase from 'firebase';
@Injectable()
export class AuthService {
@zenorocha
zenorocha / basic.md
Last active March 26, 2023 09:00
New Firebase Auth vs Old Firebase Auth
@alexbrinkman
alexbrinkman / Capybara Cheat Sheet.md
Last active November 25, 2024 15:47
A List of Methods for Capybara

Navigating

visit "/projects"
visit post_comments_path(post)

Clicking links and buttons

click_link "id-of-link"
click_link "Link Text"
@carcinocron
carcinocron / debugger pause beforeunload
Last active July 22, 2025 08:53
Chrome: pause before redirect
// Run this in the F12 javascript console in chrome
// if a redirect happens, the page will pause
// this helps because chrome's network tab's
// "preserve log" seems to technically preserve the log
// but you can't actually LOOK at it...
// also the "replay xhr" feature does not work after reload
// even if you "preserve log".
window.addEventListener("beforeunload", function() { debugger; }, false)
@eliotsykes
eliotsykes / rails_new_help_output.md
Last active July 28, 2025 11:02
"rails new" options explained

Run rails new --help to view all of the options you can pass to rails new:

$ bin/rails new --help
Usage:
  rails new APP_PATH [options]

Options:
  -r, [--ruby=PATH]                                      # Path to the Ruby binary of your choice
                                                         # Default: /Users/eliot/.rbenv/versions/2.2.0/bin/ruby
@subfuzion
subfuzion / global-gitignore.md
Last active September 4, 2025 23:38
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file:

  • Create a file called .gitignore in your home directory and add any filepath patterns you want to ignore.
  • Tell git where your global gitignore file is.

Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute .config/git/ignore for .gitignore in your home directory, if you prefer.

@staltz
staltz / introrx.md
Last active October 14, 2025 19:39
The introduction to Reactive Programming you've been missing