Skip to content

Instantly share code, notes, and snippets.

View dennmart's full-sized avatar

Dennis Martinez dennmart

View GitHub Profile
@wayneeseguin
wayneeseguin / gist:948807
Created April 29, 2011 19:00
When you login to a Linux server, what kind of information could be useful to see immediately?
General Linux question,
When you login to a Linux server, what kind of information could be useful to see immediately?
This should be implementation agnostic so no 'ubuntu' or 'gentoo' or 'whatever' specific systems.
Responses so far for the BDSM system info extension include:
* host name
* host architecture
@nofxx
nofxx / errbit-unicorn.service
Created January 5, 2015 19:15
errbit unicorn systemd service
[Unit]
Description=Errbit Unicorn Server
Requires=mongodb.service
After=mongodb.service network.target
[Service]
# Change here: user, group and directory to errbit root
User=errbit
Group=errbit
WorkingDirectory=/var/www/apps/errbit
@joerodrig
joerodrig / ReactRailsWebpackRefetch.md
Last active March 16, 2016 03:33
React + Rails + Webpack and React-Refetch

Overview and Goals

React_On_Rails is an awesome library that integrates React + Rails + Webpack, with boilerplate to quickly get you up and running on a new project. React-Refetch is also another great library that makes reading and writing data to the server in React seamless. My goal here is to develop an architecture leveraging these two libraries that accomplishes three goals:

  1. Simple
  2. Easy to maintain
  3. Scalable

To accomplish this, our architecture will leverage React-Refetch and Rails routing to expose each component to the data needed on each given page, using our server data as the single source of truth, therefore minimizing or, idealy, completely removing our use of state to modify data on many pages. This reduces the fragile nature of offloading a batch of data to one large root component and dispersing it among nested sub-components. This also allows us to always have a 1-to-1 relationship betwee

@jhbabon
jhbabon / 1.9.3-p484-railsexpress
Created November 25, 2013 07:58
rbenv recipe to install 1.9.3-p484 with railsexpress patch
build_package_patch_ruby_railsexpress() {
fetch_git rvm-patchsets git://github.com/skaes/rvm-patchsets.git master
for p in rvm-patchsets/patches/ruby/1.9.3/p484/railsexpress/* ; do
patch -p1 < $p
done
}
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b"
install_package "ruby-1.9.3-p484" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p484.tar.gz#8ac0dee72fe12d75c8b2d0ef5d0c2968" patch_ruby_railsexpress autoconf standard
@pshoukry
pshoukry / api.js
Created March 6, 2017 14:18
React / Redux fetch from rails server with CSRF token
import _ from 'underscore';
import fetch from 'isomorphic-fetch'
class API {
getCSRFToken() {
return _.find(document.getElementsByTagName('meta'), (meta) => {
return meta.name === 'csrf-token'
}).content
}
@geemus
geemus / addendum.markdown
Created September 1, 2011 20:26
API - Assumptions Probably Incorrect
@ondrejbartas
ondrejbartas / how_to_setup_cypress_with_rails_app.md
Last active April 2, 2021 01:15
How to setup Cypress on Rails apps

How to setup Cypress on Rails apps

You need to update circle.yml:

machine:
  node: # add node dependency
    version:
      7.4

environment:
@julian7
julian7 / include-vs-cover-vs-between.rb
Created November 11, 2012 18:09
include? vs. cover? vs. between?
require 'date'
require 'benchmark'
n = 1_000_000
start_date = Date.new(2012, 01, 01)
end_date = Date.new(2012, 03, 01)
act_date = Date.new(2012, 02, 01)
Benchmark.bm(10) do |x|
x.report('include?') do
@marcospedreiro
marcospedreiro / font_letter_check.txt
Created May 16, 2018 04:39
/u/martinus test pattern to check how distingushable characters are for a font
From: https://www.reddit.com/r/programming/comments/8jjq33/11_best_programming_fonts/dz0xxs5/
------
o0O s5S z2Z !|l1Iij {([|})] .,;: ``''""
a@#* vVuUwW <>;^°=-~ öÖüÜäÄßµ \/\/
the quick brown fox jumps over the lazy dog
THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG
0123456789 &-+@ for (int i=0; i<j; ++i) { }
@caseywatts
caseywatts / MediawikionHeroku.md
Last active August 16, 2022 06:28
Mediawiki on Heroku