- 1Password - https://1password.com/
- Amphetamine - https://apps.apple.com/tr/app/amphetamine/id937984704
- AppCleaner - https://freemacsoft.net/appcleaner/
- KeyCastry - https://github.com/keycastr/keycastr
- Habitify - https://www.habitify.me/
- Notion - https://www.notion.so/
- Postman - https://www.getpostman.com/
- Alfred - https://www.alfredapp.com/
/tmp/ruby-build.20220428153926.58149.kvjym0/ruby-2.7.5/lib/rubygems/core_ext/kernel_require.rb:83:in `require': cannot load such file -- openssl (LoadError) | |
from /tmp/ruby-build.20220428153926.58149.kvjym0/ruby-2.7.5/lib/rubygems/core_ext/kernel_require.rb:83:in `require' | |
from /tmp/ruby-build.20220428153926.58149.kvjym0/ruby-2.7.5/lib/rubygems/specification.rb:2430:in `to_ruby' | |
from ./tool/rbinstall.rb:846:in `block (2 levels) in install_default_gem' | |
from ./tool/rbinstall.rb:279:in `open_for_install' | |
from ./tool/rbinstall.rb:845:in `block in install_default_gem' | |
from ./tool/rbinstall.rb:835:in `each' | |
from ./tool/rbinstall.rb:835:in `install_default_gem' | |
from ./tool/rbinstall.rb:799:in `block in <main>' | |
from ./tool/rbinstall.rb:950:in `block in <main>' |
import java.util.*; | |
public class HelloWorld{ | |
// static HashSet<Integer> allLengths(int k, int shorter, int longer){ | |
// HashSet<Integer> lengths = new HashSet<Integer>(); | |
// getAllLengths(k, 0, shorter, longer, lengths); | |
// return lengths; | |
// } | |
// // O(2 ^ K) |
[ | |
{ | |
"name": "Adana", | |
"districts": [ | |
{ | |
"name": "Aladağ" | |
}, | |
{ | |
"name": "Ceyhan" | |
}, |
April 20, 2019: GAS library for this situation was published. Please check it at https://github.com/tanaikech/FetchApp.
These sample scripts are for requesting multipart post using Google Apps Script.
In most cases, the multipart request is used for uploading files. So I prepared 2 sample situations as follows. For each situation, the request parameters are different.
- Upload a file from Google Drive to Slack.
- Convert an excel file to Spreadsheet on Google Drive using Drive API v3.
require 'fileutils' | |
path = File.expand_path('../', __FILE__) | |
Dir.glob("#{path}/**/*.*").each do |file| | |
new_path = "#{path}/#{file.split('/')[-1]}" | |
FileUtils.mv(file, new_path) | |
end |
#!/usr/bin/env node | |
// Results from MacBook (Retina, 12-inch, Early 2016), 1.3 GHz Intel Core m7, macOS 10.12.3, Node 7.6.0 | |
// let a = { z: 1 } | |
// human-friendly x 85,821,153 ops/sec ±1.81% (87 runs sampled) | |
// machine-friendly x 92,613,579 ops/sec ±1.89% (85 runs sampled) | |
// Fastest is machine-friendly | |
// let a = undefined |
This gist has been moved to its own Github repo, so it's easier to contribute with additions and corrections. Please open a PR there if you see any mistake, I don't track comments on here as there's no notification system for gists AFAIK. Thanks.
Function | Shortcut |
---|---|
Previous Tab | ⌘ + Left Arrow |
Next Tab | ⌘ + Right Arrow |
Go to Tab | ⌘ + Number |
- Option: "None is a totally valid result, usually found in data structures"
- unwrap(): YOLO use in prototyping
- expect(...): to indicate the reason you believe None is impossible (or a contract violation for the method)
- Result: 😱 "Errors are unexpected but not bugs; the decision for how to handle them is up to the caller"
- unwrap(): YOLO "I'm an app and don't know how to handle this error -- I'm fine if the whole process aborts"
- try! / ?: "Leave the decision about how to handle this error to the caller; they have more information"
- match / catch: "I'm going to handle the error right here right now"
- panic!: ☠ "The error is a bug and can't be recovered from. Game over man. Rust is allowed to abort the process if it wants"
Tmux is a "terminal multiplexer" that makes it much easier to run multiple programs over a single ssh session. It lets you create multiple virtual terminals within a single ssh login, allowing you to easily flip between each virtual terminal. Each virtual terminal works like a regular terminal but has the added benefit that if you lose the overall ssh session you can log back in and re-attach to the tmux session and all your virtual terminals are still there where you left off. This also allows you to start one or more programs within virtual terminals, detach the tmux session, logout your ssh session, login via ssh a some point in the future, re-attach to your tmux session, and all your previous virtual terminals are exactly where you left off. Programs you run in virtual terminals continue to run while you're detached and/or while you're logged out all-together.
Shell cmd | Action |
---|---|
tmux | Start tmux |
tmux ls | Show existing tmux sessions |
tmux attach | Re-attach to last active |