Skip to content

Instantly share code, notes, and snippets.

View leompeters's full-sized avatar
😎
...

Leo M. Peters leompeters

😎
...
View GitHub Profile
@leompeters
leompeters / disqus.css
Created August 26, 2014 15:16
Custom CSS Code for Disqus Comment System
#dsq-comments-title h4 {
color:#333;
}
#disqus_thread {
padding:12px;
margin-bottom:-10px;
}
#disqus_thread h4 {
color:#333;
font-family: Helvetica, sans-serif;
@leompeters
leompeters / file_input_button.css
Created June 2, 2015 16:22
File input button component problem...Whipping File Inputs Into Shape with Bootstrap 3...
.btn-file {
position: relative;
overflow: hidden;
}
.btn-file input[type=file] {
position: absolute;
top: 0;
right: 0;
min-width: 100%;
min-height: 100%;
@leompeters
leompeters / autocomplete.js
Last active September 30, 2020 19:42
JavaScript and CoffeeScript for autocomplete input fields with ajax request and json.
/**
* Miscellaneous JavaScript for autocomplete input fiels with ajax request and json.
*
* @namespace Belanton.Codes.Scripts
* @see https://gist.github.com/leonardomarques/6970e7d86409f35bb3fd
* @author Leonardo Marques <leonardo.marques@belanton.com>
* @license Licensed under the MIT license [http://www.opensource.org/licenses/mit-license.php]
* @copyright Copyright (c) 2013 Belanton, Inc. [http://www.belanton.com]
*/
@leompeters
leompeters / test.yml
Created July 29, 2020 02:46 — forked from vvo/test.yml
Rails and PostgreSQL setup for GitHub actions (CI)
name: Test
on: [push]
jobs:
build:
runs-on: ubuntu-latest
# Similar to docker-compose.yml but not the same, 🤷‍♂️
services:
@leompeters
leompeters / Dockerfile
Created July 22, 2020 16:37 — forked from YusukeIwaki/Dockerfile
rails new
FROM ruby:2.6-alpine
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
RUN bundle init
RUN sed -i -e 's/# gem "rails"/gem "rails"/' Gemfile
# For installing Nokogiri (ref: https://copo.jp/blog/2016/03/alpine-%E3%81%AE-ruby-%E3%81%AE%E3%82%A4%E3%83%A1%E3%83%BC%E3%82%B8%E3%81%AB-nokogiri-%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB/ )
RUN apk add --no-cache build-base libxml2-dev libxslt-dev
@leompeters
leompeters / bootstrap-typeahead-combobox.html.erb
Last active May 7, 2020 19:22
Choose how input to use with bootstrap-combobox.
<!-- Choose how input to use with bootstrap-combobox. -->
<%= f.input :parent_name, label: false, hint: false do %>
<div class="input-append input-block-level">
<%= f.input_field :parent_name, as: :string, placeholder: false, disabled: true,
autocomplete: "off", data: { provide: "typeahead" } %>
<span id="tog" class="add-on typeahead-toggle">
<span class="caret"></span>
</span>
</div> <!-- /.input-append -->
@leompeters
leompeters / git_patterns.md
Last active May 7, 2020 18:44
Some rules to use on your git commit messages.

Git Patterns

Some rules to use on your git commit messages.

Commit Messages:

[jira issue] #[action] : [issue description]

Actions:

@leompeters
leompeters / ExampleFeature-Cucumber.feature
Last active May 7, 2020 18:29
Cucumber example feature in Gherkin.
# Cucumber example feature in Gherkin.
Feature: Example feature
As an user of Cucumber.js
I want to have documentation on Cucumber
So that I can concentrate on building awesome applications
Scenario: Reading documentation
Given I am on the Cucumber.js GitHub repository
When I go to the README file
// Example got on LinkedIn (https://www.linkedin.com/groups/3242849/3242849-6143986010788216834):
// https://github.com/glondon/signup/blob/master/gdform.php
<?php
if (empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) !== 'xmlhttprequest')
exit(header('Location: http://signupandmakemoney.com/info/ajax-error.html'));
session_start();
/* Don't need this anymore...
$request_method = $_SERVER["REQUEST_METHOD"];
if($request_method == "GET"){
$query_vars = $_GET;
@leompeters
leompeters / appium_settings_android_java.sh
Last active May 7, 2020 15:51
When install Appium, probably you will need to make it running fine with this configurations.
# When install Appium, probably you will need to make it running fine with this configurations.
# http://stackoverflow.com/a/40168992/2334082
$ <atom|subl|mine> /Applications/Appium.app//Contents/Resources/node_modules/appium/node_modules/appium-support/build/lib/system.js
$ <atom|subl|mine> /Applications/Appium.app//Contents/Resources/node_modules/appium/node_modules/appium-support/lib/system.js
$ <atom|subl|mine> /Applications/Appium.app//Contents/Resources/node_modules/appium-support/build/lib/system.js
$ <atom|subl|mine> /Applications/Appium.app//Contents/Resources/node_modules/appium-support/lib/system.js
# http://stackoverflow.com/a/19986294/2334082
$ export ANDROID_HOME=/Users/leomperes/Library/Android/sdk