Taken from StackExchange
Thanks to LangLangC
For temperature and other improvements see https://gist.github.com/cdleon/d16e7743e6f056fedbebc329333d79df
| # study stream aliases | |
| # Requires https://github.com/caarlos0/timer to be installed. spd-say should ship with your distro | |
| declare -A pomo_options | |
| pomo_options["work"]="45" | |
| pomo_options["break"]="10" | |
| pomodoro () { | |
| if [ -n "$1" -a -n "${pomo_options["$1"]}" ]; then | |
| val=$1 |
Taken from StackExchange
Thanks to LangLangC
For temperature and other improvements see https://gist.github.com/cdleon/d16e7743e6f056fedbebc329333d79df
Type crontab -l to see your cron jobs. Type crontab -e to edit them. You have to use Vim apparently.
Add a line like this:
0,30 * * * * /Users/YOURNAME/Documents/scripts/stretch.sh
That is on every 0th and 30th minute of the hour. Make sure all the separators in there are tabs!
| # Elixir has pipes `|>`. Let's try to implement those in Ruby. | |
| # | |
| # I want to write this: | |
| # | |
| # email.body | RemoveSignature | HighlightMentions | :html_safe | |
| # | |
| # instead of: | |
| # | |
| # HighlightMentions.call(RemoveSignature.call(email.body)).html_safe | |
| # |
| # coding: utf-8 | |
| require 'fileutils' | |
| ### 定数 ### | |
| COMPILER = "g++" | |
| CPPFLAGS = %w{} | |
| LDFLAGS = %w{} | |
| INC_DIRS = [] | |
| LIB_DIRS = [] | |
| TARGET = "app" |
| # activerecord-3.0.0/lib/active_record/connection_adapters/mysql_adapter.rb | |
| # Maps logical Rails types to MySQL-specific data types. | |
| def type_to_sql(type, limit = nil, precision = nil, scale = nil) | |
| return super unless type.to_s == 'integer' | |
| case limit | |
| when 1; 'tinyint' | |
| when 2; 'smallint' | |
| when 3; 'mediumint' | |
| when nil, 4, 11; 'int(11)' # compatibility with MySQL default |
| #RP5_HOME: "" # windoes users should set this | |
| PROCESSING_ROOT: "/usr/share/processing" # Works for ArchLinux | |
| #PROCESSING_ROOT: "/home/tux/processing-2.2.1" # Other linux distros with user tux | |
| #PROCESSING_ROOT: "/Applications/Processing.app/Contents/Java" # Path for Mac | |
| #PROCESSING_ROOT: "C:\Java\processing-2.2.1" # if you follow PhiLhos suggestion for windoes |
| #!/bin/sh | |
| inPreprocessorMode () { | |
| hasE=0 | |
| hasU=0 | |
| hasT=0 | |
| for arg in "$@" | |
| do | |
| if [ 'x-E' = "x$arg" ]; then hasE=1; fi | |
| if [ 'x-undef' = "x$arg" ]; then hasU=1; fi |
| require "active_record" | |
| namespace :db do | |
| db_config = YAML::load(File.open('config/database.yml')) | |
| db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'}) | |
| desc "Create the database" | |
| task :create do | |
| ActiveRecord::Base.establish_connection(db_config_admin) |
| --colour | |
| -I app |