- /r/SuggestALaptop
- /r/linuxhardware
- noteb.com
- productchart
- notebookcheck
- notebookreview
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scriptencoding utf-8 | |
" To install nvim on ubuntu: | |
" sudo apt-get install software-properties-common | |
" sudo add-apt-repository ppa:neovim-ppa/unstable | |
" sudo apt-get update | |
" sudo apt-get install neovim | |
" sudo apt-get install python-dev python-pip python3-dev python3-pip | |
" sudo update-alternatives --install /usr/bin/vi vi /usr/bin/nvim 60 | |
" sudo update-alternatives --config vi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extras/* linguist-documentation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/** | |
* Basic code to parse the values in the "data" attribute in a Google Maps URL to an Array. | |
* There will likely still be some work to do to interpret the resulting Array. | |
* | |
* Based on information from: | |
* http://stackoverflow.com/a/34275131/1852838 | |
* http://stackoverflow.com/a/24662610/1852838 | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'socket' | |
require 'uri' | |
def fire_and_forget_post(url, body) | |
uri = URI.parse(url) | |
req = [] | |
port = ":#{uri.port}" if uri.port != 80 | |
req << "POST #{uri.request_uri} HTTP/1.1" | |
req << "Host: #{uri.host}#{port}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module TreeListHelper | |
# the collection need to be the root parents | |
def tree_list(collection) | |
content_tag(:ul) do | |
collection.each do |item| | |
if item.children.any? | |
concat( | |
content_tag(:li, id: item.id) do | |
concat(item.name) | |
concat(tree_list(item.children)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query IntrospectionQuery { | |
__schema { | |
queryType { name } | |
mutationType { name } | |
subscriptionType { name } | |
types { | |
...FullType | |
} | |
directives { |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## ubuntu server with bash shell | |
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
## verify | |
type rbenv |