Skip to content

Instantly share code, notes, and snippets.

View guipmourao's full-sized avatar
🏠
Working from home

Guilherme Mourão guipmourao

🏠
Working from home
View GitHub Profile

Assigning Static IP Addresses in WSL2

WSL2 uses Hyper-V for networking. The WSL2 network settings are ephemeral and configured on demand when any WSL2 instance is first started in a Windows session. The configuration is reset on each Windows restart and the IP addresses change each time. The Windows host creates a hidden switch named "WSL" and a network adapter named "WSL" (appears as "vEthernet (WSL)" in the "Network Connections" panel). The Ubuntu instance creates a corresponding network interface named "eth0".

Assigning static IP addresses to the network interfaces on the Windows host or the WSL2 Ubuntu instance enables support for the following scenarios:

@guipmourao
guipmourao / ubuntu16.04-command-line-install-android-sdk
Created March 15, 2017 12:17
Ubuntu 16.04 command line install android sdk
# create sdk folder
export ANDROID_HOME=/opt/android-sdk-linux
sudo mkdir -p $ANDROID_HOME
# install openjdk
sudo apt-get install openjdk-8-jdk
# download android sdk
cd $ANDROID_HOME
sudo wget https://dl.google.com/android/repository/tools_r25.2.3-linux.zip
jQuery(document).ready(function ($) {
$('#navquote').on('click', function() {
ga('send', 'event', 'Quick Quote Call To Action', 'click', 'Launch Lightbox Form');
});
$('#headerphone').on('click', function() {
ga('send', 'event', 'Phone Number Touch/Click', 'click', 'Header');
});
$('#footerphone').on('click', function() {
ga('send', 'event', 'Phone Number Touch/Click','click', 'Footer');
});
;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;
; All relative paths in this configuration file are relative to PHP's install
; prefix.
; Include one or more files. If glob(3) exists, it is used to include a bunch of
; files from a glob(3) pattern. This directive can be used everywhere in the
; file.
; php options
session.save_handler = files
session.save_path = /var/lib/php5
session.gc_maxlifetime = 1440
; hhvm specific
hhvm.log.level = Warning
hhvm.log.always_log_unhandled_exceptions = true
hhvm.log.runtime_error_reporting_level = 8191
hhvm.mysql.typed_results = false
; php options
pid = /var/run/hhvm/pid
; hhvm specific
hhvm.server.file_socket = /var/run/hhvm/hhvm.sock
hhvm.server.type = fastcgi
hhvm.server.default_document = index.php
hhvm.log.use_log_file = true
; Start a new pool named 'www'.
[www]
; The address on which to accept FastCGI requests.
; Valid syntaxes are:
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on
; a specific port;
; 'port' - to listen on a TCP socket to all addresses on a
; specific port;
; '/path/to/unix/socket' - to listen on a unix socket.
upstream hhvm {
server unix:/var/run/hhvm/hhvm.sock;
}
upstream php {
server unix:/var/run/php-fpm.sock;
}
user nginx;
worker_processes 1;
pid /var/run/nginx.pid;
events {
worker_connections 768;
multi_accept on;
use epoll;
}
var workingDateRange = "LAST_14_DAYS";
function main() {
lowerBidsToTopKeywords();
raiseBidsToMidPositionKeywords();
raiseBidsToLowPositionKeywords();
}