This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SoftwareSerial.h> | |
#define ledPin 7 | |
SoftwareSerial mySerial(2, 3); | |
int val; | |
void setup() { | |
pinMode(ledPin, OUTPUT); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SoftwareSerial.h> | |
SoftwareSerial mySerial(2, 3); // RX, TX | |
int i = 0; | |
void setup() { | |
mySerial.begin(9600); | |
Serial.begin(9600); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mycompany.cms2components.data; | |
public class ItemOption { | |
private Integer id; | |
private String title; | |
private String description; | |
private String thumbUrl; | |
public ItemOption() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PROJECT_NAME="article" | |
# Check if a session with a such name already exists | |
tmux has-session -t $PROJECT_NAME | |
# If session does not exists | |
if [ $? != 0 ] | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Disable Arrow keys in Escape mode | |
map <up> <nop> | |
map <down> <nop> | |
map <left> <nop> | |
map <right> <nop> | |
" Disable Arrow keys in Insert mode | |
imap <up> <nop> | |
imap <down> <nop> | |
imap <left> <nop> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function install_mix_dependencies() { | |
echo "Starting installing MIX dependencies..." | |
docker run \ | |
--rm --memory="512M" \ | |
-w="/app" \ | |
-v $PWD:/app \ | |
-e MIX_ENV=prod \ | |
--entrypoint=/app/docker/mix_deps_install.sh \ | |
elixir:1.3.2 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule DynamicProcesses.Examples do | |
alias DynamicProcesses.{SomeSupervisor, SomeWorker} | |
import Supervisor.Spec | |
def add_single_supervisor(id \\ "1") do | |
{:ok, supervisor_spec} = build_supervisor_spec(SomeSupervisor, [], id) | |
Supervisor.start_child(DynamicProcesses.Supervisor, supervisor_spec) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule DynamicProcesses do | |
use Application | |
def start(_type, _args) do | |
import Supervisor.Spec, warn: false | |
children = [ | |
] | |
opts = [strategy: :one_for_one, name: DynamicProcesses.Supervisor] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module WithDefaultScopeExtension | |
def with_default_scope(scope_options, &block) | |
normalized_scope_options = Array(scope_options) | |
scope(*normalized_scope_options) do | |
instance_exec(&block) | |
end | |
end | |
end | |
ActionDispatch::Routing::Mapper.send :include, WithDefaultScopeExtension |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require ::File.expand_path('../config/environment', __FILE__) | |
map 'YOUR_PREFIX_HERE' do | |
run Rails.application | |
end |
NewerOlder