1. Get your IP Address
echo `ifconfig $(netstat -nr | grep -e default -e "^0\.0\.0\.0" | head -1 | awk '{print $NF}') | grep -e "inet " | sed -e 's/.*inet //' -e 's/ .*//' -e 's/.*\://'`
// Modified from @mutsuda's https://medium.com/@mutsuda/create-an-ios-widget-showing-google-spreadsheets-data-856767a9447e | |
// by @levelsio | |
// HOW TO | |
// 1) Make a Google Sheet, we'll pull the first cell e.g. A1 | |
// 2) Publish your Google Sheet, File -> Publish To Web | |
// 3) Copy the SHEET_ID in the URL, put it in here below: | |
const endpoint = "https://spreadsheets.google.com/feeds/cells/1RKJ65dTptKlXQ4E6JbGEVLrK6lC9pZnEvkzn68twckA/1/public/full?alt=json" | |
// 4) Install Scriptable @ https://apps.apple.com/us/app/scriptable/id1405459188 | |
// 5) Copy this entire script in to Scriptable (tip: you can send it to your iPhone via Whatsapp/Messenger/Telegram etc) |
clone() { | |
git clone git@github.com:$1/$2.git | |
} |
SELECT | |
NTH(50, quantiles(INTEGER(bytesHtml/1024))) | |
+ NTH(50, quantiles(INTEGER(bytesHtmlDoc/1024))) | |
as html, | |
NTH(50, quantiles(INTEGER(bytesCSS/1024))) | |
as css, | |
NTH(50, quantiles(INTEGER(bytesJS/1024))) |
Back in 2011, I was working with ActionScript but what I really wanted to do was HTML5. My father always said that if I wanted to learn something for real, I'd have to teach it. So I sent a proposal to speak about HTML5 at a free software forum in a very small city.
I didn't expect them to accept it but they did. I had no experience with HTML5 and had to give an entire presentation about it. I could have freaked out and give them some lame excuse for not to do it, but I put myself together and studied like crazy. Couple weeks later I gave the talk and survived to tell this story.
You see, most people think they should be experts in order to give a talk. That is just not true. Once you realize that every human being is different and we all have the capacity to teach something to someone else, you'll understand that you can do anything.
F
var searchInput = document.querySelector('#search-input'); | |
searchInput.addEventListener('input', function() { // Triggers when a user writes something | |
Launchpad // Uses Launchpad API Client to make an AJAX request | |
.url('http://liferay.io/docs/search/all') // Points to the API URL where the data is stored | |
.search('*', 'prefix', searchInput.value) // Filters results based on what the user typed | |
.highlight('content') // Automatically highlights the words that matched our query | |
.get() // Specifies what kind of HTTP request are we going to make | |
.then(function(result) { | |
// Renders the result in the page |
#!/usr/bin/env zsh | |
openssl genrsa -des3 -out self-signed.pass.key 2048 | |
openssl rsa -in self-signed.pass.key -out self-signed.key | |
openssl req -new -key self-signed.key -out self-signed.csr | |
openssl x509 -req -days 365 -in self-signed.csr -signkey self-signed.key -out self-signed.crt | |
echo "SHA1 fingerprint:\n" | |
openssl x509 -in self-signed.crt -sha1 -noout -fingerprint |
var Clipboard = require('clipboard'); |
var Clipboard = require('clipboard'); |