duplicates = multiple editions
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
#!/bin/bash | |
### | |
### my-script — does one thing well | |
### | |
### Usage: | |
### my-script <input> <output> | |
### | |
### Options: | |
### <input> Input file to read. | |
### <output> Output file to write. Use '-' for stdout. |
#First of all, require all of rails (maybe it doesn't need to be all, but for now it is) | |
require 'rails/all' | |
#then i need to slightly overwrite a rails method: | |
def encrypted(path, key_path: "config/master.key", env_key: "RAILS_MASTER_KEY") | |
ActiveSupport::EncryptedConfiguration.new( | |
config_path: path, | |
key_path: key_path, |
# make directory for new rails app | |
mkdir app | |
cd app | |
# specify ruby version | |
echo 2.3.1 > .ruby-version | |
# initialize bundler (creates Gemfile) | |
bundler init |
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */ | |
/* ========================================================================== | |
HTML5 display definitions | |
========================================================================== */ | |
/** | |
* Correct `block` display not defined in IE 8/9. | |
*/ |
/** | |
* Retrieves all the rows in the active spreadsheet that contain data and logs the | |
* values for each row. | |
* For more information on using the Spreadsheet API, see | |
* https://developers.google.com/apps-script/service_spreadsheet | |
*/ | |
function readRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); |
Since this is on Hacker News and reddit...
_t
in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I am the system libraries".char *
s.type * name
, however, is entirely intentional.-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
#This will run Perl and Python scripts respectively in Rails console using 'gem escape'. Gem Escape allows to format path to the scripts properly. | |
perl_cmd = Escape.shell_command(['perl', "#{RAILS_ROOT}/bin/test_perl_script.pl"]).to_s | |
system perl_cmd | |
python_cmd = Escape.shell_command(['python', "#{RAILS_ROOT}/bin/test_python_script.py"]).to_s | |
system python_cmd |
(require 'iimage) | |
(autoload 'iimage-mode "iimage" "Support Inline image minor mode." t) | |
(autoload 'turn-on-iimage-mode "iimage" "Turn on Inline image minor mode." t) | |
(add-to-list 'iimage-mode-image-regex-alist '("@startuml\s+\\(.+\\)" . 1)) | |
;; Rendering plantuml | |
(defun plantuml-render-buffer () | |
(interactive) | |
(message "PLANTUML Start rendering") | |
(shell-command (concat "java -jar ~/Downloads/plantuml.jar " |