Skip to content

Instantly share code, notes, and snippets.

View unixc3t's full-sized avatar
💢
coding

rudy unixc3t

💢
coding
View GitHub Profile
@unixc3t
unixc3t / Error_Terminal
Last active April 7, 2017 13:58 — forked from rrmartins/Error_Terminal
Solve Error Devise with RSpec and Rails 4 uninitialized constant ControllerMacros
.../spec/spec_helper.rb:27:in `block (2 levels) in <top (required)>': uninitialized constant ControllerMacros (NameError)
@unixc3t
unixc3t / Array.java
Created April 14, 2017 05:50 — forked from jnwhiteh/Array.java
An example of implementing Iterable and Iterator in Java
import java.util.Iterator;
import java.util.NoSuchElementException;
// Introduction:
//
// This is an example class meant to illustrate several differen concepts:
// * The use of type parameters (i.e. Java generics)
// * Implementing an iterator over some collection, in this case an array
// * Implementing the Iterable interface, which enables your collection
// to work with the Java simple for loops, i.e. (for String s : list)
@unixc3t
unixc3t / plugin.sh
Created June 29, 2017 07:02
Create rspec rails plugin
# http://stackoverflow.com/questions/8507798/rails-3-1-plugin-gem-dummy-test-app-rspec
# http://namick.tumblr.com/post/17663752365/how-to-create-a-gemified-plugin-with-rails-3-2-rspec
rails plugin new plugin_name --skip-test-unit --dummy-path=spec/dummy
cd plugin_name
# Add rspec-rails to gemspec dev deps
# s.add_development_dependency "rspec-rails"
bundle install
@unixc3t
unixc3t / install_elixir.md
Created July 24, 2017 09:35 — forked from rubencaro/install_elixir.md
Elixir installation guide

Elixir installation guide

Version numbers should be the ones you want. Here I do it with the last ones available at the moment of writing.

The simplest way to install elixir is using your package manager. Sadly, at the time of writing only Fedora shows the intention to keep its packages up to date. There you can simply sudo dnf install erlang elixir and you are good to go.

Anyway, if you intend to work with several versions of erlang or elixir at the same time, or you are tied to a specific version, you will need to compile it yourself. Then asdf is your best friend.

@unixc3t
unixc3t / install-swift-ubuntu.md
Created November 21, 2017 02:54 — forked from Azoy/install-swift-ubuntu.md
Guide on how to install Swift on Ubuntu

Install Swift on Ubuntu

Requirements

  1. Ubuntu 14.04, 16.04, or 16.10

Step 1 - Dependencies

  1. Open up terminal
  2. Install core deps: sudo apt-get install clang libicu-dev git

Step 1.1 - Ubuntu 14.04 Clang

@unixc3t
unixc3t / swift_4_ubuntu16_04.sh
Created November 21, 2017 15:06 — forked from serhii-londar/swift_4_1_ubuntu16_04.sh
Install swift 4 on Ubuntu 16.04 bash script
#!/bin/bash
sudo apt-get install clang libicu-dev libcurl4-openssl-dev lldb git wget unzip -y
wget https://swift.org/builds/swift-4.0-release/ubuntu1604/swift-4.0-RELEASE/swift-4.0-RELEASE-ubuntu16.04.tar.gz
tar zxf swift-4.0*.tar.gz && rm -rf swift-4.0*.tar.gz
sudo mv swift-4.0* /swift-4.0
echo "export PATH=/swift-4.0/usr/bin:\"\${PATH}\"" >> ~/.bashrc
source ~/.bashrc
@unixc3t
unixc3t / router.pi-2.md
Created November 23, 2017 05:34 — forked from snakevil/router.pi-2.md
使用树莓派3B打造超强路由之二:初成

使用树莓派3B打造超强路由之二:初成

通过第一篇《使用树莓派3B打造超强路由之一:初装》的努力,树莓派3B已经可以作为一台超低能耗、随身携带的开发用服务器来使用了。但这对于目标——打造超强路由而言,才刚刚开始。接下来,我们需要将其打磨成一台基本的无线路由器。

WARNING 本文所有指令均仅供参考,切勿无脑复制粘贴!

@unixc3t
unixc3t / router.pi-1.md
Created November 23, 2017 05:34 — forked from snakevil/router.pi-1.md
使用树莓派3B打造超强路由之一:初装

使用树莓派3B打造超强路由之一:初装

新款的树莓派3B功能之丰富,性能之强悍,让我垂涎。考虑到家里的网件 WNDR3700v2 也服役四年有余了。还是败了一个树莓派3B回来打造成新的路由。

WARNING 本文所有指令均仅供参考,切勿无脑复制粘贴!

〇 安装系统

@unixc3t
unixc3t / 01ruby.el
Created January 1, 2018 08:45 — forked from gnufied/01ruby.el
(setq enh-ruby-program "/home/gnufied/.rbenv/versions/1.9.3-p448/bin/ruby")
(autoload 'enh-ruby-mode "enh-ruby-mode" "Major mode for ruby files" t)
(add-to-list 'auto-mode-alist '("\\.rb$" . enh-ruby-mode))
(add-to-list 'auto-mode-alist '("\\.rake$" . enh-ruby-mode))
(add-to-list 'auto-mode-alist '("Rakefile$" . enh-ruby-mode))
(add-to-list 'auto-mode-alist '("\\.gemspec$" . enh-ruby-mode))
(add-to-list 'auto-mode-alist '("\\.ru$" . enh-ruby-mode))
(add-to-list 'auto-mode-alist '("Gemfile$" . enh-ruby-mode))
(add-to-list 'interpreter-mode-alist '("ruby" . enh-ruby-mode))
@unixc3t
unixc3t / install-docker.sh
Created May 29, 2018 06:40 — forked from dweldon/install-docker.sh
Install docker CE on Linux Mint 18.3
#!/usr/bin/env bash
# https://docs.docker.com/install/linux/docker-ce/ubuntu/
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
sudo apt-get update
sudo apt-get install docker-ce
# https://docs.docker.com/compose/install/