sudo chmod 400 my_private_key.pem
ssh -i my_private_key.pem ubuntu@
sudo ip tuntap add dev tap0 mode tap group kvm sudo brctl addif br0 tap0 sudo ip link set dev tap0 up promisc on #sudo sysctl -w net.ipv4.ip_forward=1
emulator -avd Pixel_3a_API_30_x86 -netfast -accel auto -qemu -device virtio-net,netdev=net0,mac=52:55:00:d1:55:51 -netdev tap,id=net0,ifname=tap0,script=no,downscript=no
adb root
/** | |
* ------------------------------------------ | |
* MD5 function for GAS(GoogleAppsScript) | |
* | |
* You can get a MD5 hash value and even a 4digit short Hash value of a string. | |
* ------------------------------------------ | |
* Usage1: | |
* `=MD5("YourStringToHash")` | |
* or | |
* `=MD5( A1 )` |
The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.
The correct way of creating a private frok by duplicating the repo is documented here.
For this assignment the commands are:
git clone --bare [email protected]:usi-systems/easytrace.git
#!/bin/sh | |
# @author: Alexandre Plennevaux | |
# @description: MIRROR DISTANT FOLDER TO LOCAL FOLDER VIA FTP | |
# | |
# FTP LOGIN | |
HOST='sftp://ftp.domain.com' | |
USER='ftpusername' | |
PASSWORD='ftppassword' | |
# DISTANT DIRECTORY |
<?php | |
// apitest.php | |
// by Karl Kranich - karl.kranich.org | |
// version 3.1 - edited query section | |
require_once realpath(dirname(__FILE__) . '/vendor/autoload.php'); | |
include_once "google-api-php-client/examples/templates/base.php"; | |
$client = new Google_Client(); |
#!/bin/bash | |
# | |
# Highligh Nginx config file in Vim | |
# Download syntax highlight | |
mkdir -p ~/.vim/syntax/ | |
wget http://www.vim.org/scripts/download_script.php?src_id=19394 -O ~/.vim/syntax/nginx.vim | |
# Set location of Nginx config file | |
cat > ~/.vim/filetype.vim <<EOF |
<?php | |
// Section 5: edit a row | |
// You'll need to get the etag and row ID, and send a PUT request to the edit URL | |
$rowid = 'cre1l'; // got this and the etag from the table data output from section 3 | |
$etag = 'NQ8VCRBLVCt7ImA.'; | |
$url = "https://spreadsheets.google.com/feeds/list/$fileId/od6/private/full/$rowid"; | |
$method = 'PUT'; | |
$headers = ["Authorization" => "Bearer $accessToken", 'Content-Type' => 'application/atom+xml', 'GData-Version' => '3.0']; | |
$postBody = "<entry xmlns=\"http://www.w3.org/2005/Atom\" xmlns:gsx=\"http://schemas.google.com/spreadsheets/2006/extended\" xmlns:gd=\"http://schemas.google.com/g/2005\" gd:etag='"$etag"'><id>https://spreadsheets.google.com/feeds/list/$fileid/od6/$rowid</id><gsx:gear>phones</gsx:gear><gsx:quantity>6</gsx:quantity></entry>"; | |
$req = new Google_Http_Request($url, $method, $headers, $postBody); |
{ | |
"AF": { | |
"name": "Afghanistan", | |
"iso2": "AF", | |
"iso3": "AFG", | |
"nationality": "Afghan", | |
"code": "004", | |
"prefix": "93" | |
}, | |
"AL": { |