Mounting
sshfs {user}@{host}:{path} {mounting_path} -o ServerAliveInterval=60 -o allow_other
MacOS unmount
umount -f {path}
| // Little function to make all links of a page in an Electron project | |
| // open in the OS Browser instead of the Project's window. | |
| linksArray = document.getElementsByTagName("a"); | |
| for (var i = 0; i < linksArray.length; i++) { | |
| linksArray[i].setAttribute("onclick","app.openInBrowser('" + linksArray[i].href + "')"); | |
| linksArray[i].href = "#"; | |
| } |
| // Use this file as a starting point for your project's .eslintrc. | |
| // Copy this file, and add rule overrides as needed. | |
| { | |
| "parser": "babel-eslint", | |
| "extends": "airbnb", | |
| "plugins": [ | |
| "html" | |
| ], | |
| "env": { | |
| "es6": true, |
| /** | |
| * Loads an HTML document from a URL and retuns an element selected using | |
| * the 'selector' parameter | |
| * Example usage: | |
| * loadPageSection('./myPage.html', '#container', (r, err) => console.log(r, err)); | |
| * | |
| * @method loadPageSection | |
| * @param {String} url | |
| * @param {String} selector - A valid CSS selector | |
| * @param {Function} callback - To be called with two parameters (response, error) |
| git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%Cgreen(%>(14)%cr) %C(bold blue)<%<(17,trunc)%an>%Creset %s %C(yellow)%d%Creset' --abbrev-commit" |
| html { | |
| /*background-color: #f5f5f5;*/ | |
| } | |
| body { | |
| font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; | |
| } | |
| a { | |
| color: #E91E63; | |
| } | |
| p { |
| module Lib where | |
| import Data.List (foldr) | |
| -- Complete the highestValuePalindrome function below. | |
| highestValuePalindrome :: String -> Int -> Int -> String | |
| highestValuePalindrome s n changesAllowed = | |
| if changesToMakePalindrome > changesAllowed | |
| then "-1" |
| import Data.Function | |
| import Data.List | |
| import Data.Maybe | |
| import qualified Data.Set as Set | |
| import qualified Data.Map as Map | |
| -- Longest increasing subsequence | |
| -- O(nlogn) | |
| lis :: Ord a => [a] -> [a] | |
| lis = buildResult . snd . mapAccumL takeMax (Set.empty, Nothing) |
Mounting
sshfs {user}@{host}:{path} {mounting_path} -o ServerAliveInterval=60 -o allow_other
MacOS unmount
umount -f {path}
| {- This is a solution to https://github.com/josevalim/nested-map-reduce-traversal | |
| without using explicit accumulators. | |
| You can run it with: | |
| $ ghc Main.hs && ./Main | |
| Which outputs: | |
| Numbered 0 ("One",[Numbered 0 "A",Numbered 1 "B"]) | |
| Numbered 1 ("Two",[Numbered 2 "C",Numbered 3 "D",Numbered 4 "E"]) | |
| Numbered 2 ("Three",[Numbered 0 "F",Numbered 1 "G"]) |