Crystal 0.9.1 with Kemal
require "kemal"
ws "/" do |socket|
socket.on_message do |message|
end
module Rack | |
class FirebugLogger | |
def initialize(app, options = {}) | |
@app = app | |
@options = options | |
end | |
def call(env) | |
status, headers, orig_response = @app.call(env) | |
return [status, headers, orig_response] unless (headers["Content-Type"] =~ /html/ && env['firebug.logs']) |
module Excel | |
module Formulas | |
def pmt(rate, nper, pv, fv=0, type=0) | |
((-pv * pvif(rate, nper) - fv ) / ((1.0 + rate * type) * fvifa(rate, nper))) | |
end | |
def ipmt(rate, per, nper, pv, fv=0, type=0) | |
p = pmt(rate, nper, pv, fv, 0); | |
ip = -(pv * pow1p(rate, per - 1) * rate + p * pow1pm1(rate, per - 1)) | |
(type == 0) ? ip : ip / (1 + rate) |
import sublime_plugin | |
import os | |
# ------------------------------------------- | |
# You will need to create a key mapping for this, something like: | |
# { "keys": ["alt+e"], "command": "switch_to_file" } | |
# ------------------------------------------- | |
class SwitchToFileCommand(sublime_plugin.WindowCommand): | |
def run(self): | |
self.display_list = [] | |
self.views = [] |
def pbcopy(str) | |
IO.popen('pbcopy', 'r+') {|io| io.puts str } | |
output.puts "-- Copy to clipboard --\n#{str}" | |
end | |
Pry.config.commands.command "hiscopy", "History copy to clipboard" do |n| | |
pbcopy _pry_.input_array[n ? n.to_i : -1] | |
end | |
Pry.config.commands.command "copy", "Copy to clipboard" do |str| |
Pry.config.editor = "vim --noplugin" | |
if defined?(PryByebug) | |
Pry.commands.alias_command 'c', 'continue' | |
Pry.commands.alias_command 's', 'step' | |
Pry.commands.alias_command 'n', 'next' | |
Pry.commands.alias_command 'f', 'finish' | |
Pry.commands.alias_command 'b', 'break' | |
Pry.commands.alias_command 'bda', 'break --disable-all' | |
end |
Crystal 0.9.1 with Kemal
require "kemal"
ws "/" do |socket|
socket.on_message do |message|
end
install termpix from https://github.com/fimkap/termpix (currently alpha blending done with white background) | |
-- init.vim (along with usual FZF setup, change path to termpix) | |
let g:fzf_layout = { 'down': '~60%' } | |
let g:fzf_files_options = | |
\ '--preview "(~/dev/termpix/bin/termpix --width 50 --true-color {} || cat {}) 2> /dev/null "' |
/* Semantic UI has these classes, however they're only applicable to*/ | |
/* grids, containers, rows and columns.*/ | |
/* plus, there isn't any `mobile hidden`, `X hidden` class.*/ | |
/* this snippet is using the same class names and same approach*/ | |
/* plus a bit more but to all elements.*/ | |
/* see https://github.com/Semantic-Org/Semantic-UI/issues/1114*/ | |
/* Mobile */ | |
@media only screen and (max-width: 767px) { | |
[class*="mobile hidden"], |
<div className='delete-button' onClick={() => { if (window.confirm('Are you sure you wish to delete this item?')) this.onCancel(item) } } /> |
Note
to active Office without crack, just follow https://github.com/WindowsAddict/IDM-Activation-Script,
you wiil only need to run
irm https://massgrave.dev/ias | iex