- create a file to keep environment variables (called env.sh here) at /etc/profile.d/env.sh
- export two proxy variable in /etc/profile.d/evn.sh as below
export http_proxy=http://<ip/name>:<port>
export https_proxy=$http_proxy
// This object contains a string value that in contains a single quote, | |
// a double quote, a backtick, and a backslash. | |
const data = { foo: `a'b"c\`d\\e` }; | |
// Turn the data into its JSON-stringified form. | |
const json = JSON.stringify(data); | |
// Now, we want to insert the data into a script body as a JavaScript | |
// string literal per https://v8.dev/blog/cost-of-javascript-2019#json, | |
// escaping special characters like `"` in the data. |
package main | |
import ( | |
"container/ring" | |
"image" | |
"log" | |
"math/rand" | |
"os" | |
"time" |
const AWS = require('aws-sdk') | |
AWS.config.region = process.env.AWS_REGION | |
const AWS_IOT_CORE_ENDPOINT = process.env.MQTT_BROKER_ENDPOINT | |
const IOT_THING_NAME = process.env.THING_NAME | |
const iotdata = new AWS.IotData({ | |
endpoint: AWS_IOT_CORE_ENDPOINT, | |
}) |
wget https://storage.googleapis.com/golang/go1.10.1.linux-armv6l.tar.gz | |
sudo tar -C /usr/local -xvf go1.10.1.linux-armv6l.tar.gz | |
cat >> ~/.bashrc << 'EOF' | |
export GOPATH=$HOME/go | |
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin | |
EOF | |
source ~/.bashrc |
LINUX | |
====== | |
rajdeeprath@rajdeeprath-VirtualBox:~$ ffmpeg -i /home/rajdeeprath/Downloads/bbb_480p_1000_64_1.mp4 -vcodec libx264 -vb 500k -vprofile baseline -level 2.1 -acodec libfdk_aac -ab 64000 -ar 48000 -ac 2 -f flv "rtmp://127.0.0.1:1935/live?username=testuser&password=testpass/streamname" | |
WINDOWS | |
======= | |
C:\Users\rajde>ffmpeg -i K:\lpackage\bbb_480p_1000_64.mp4 -vcodec libx264 -vb 500k -vprofile baseline -level 2.1 -acodec aac -ab 64000 -ar 48000 -ac 2 -strict experimental -f flv "rtmp://127.0.0.1:1935/live/streamname app=live?username=testuser&password=testpass live=1" |
brew options ffmpeg | |
brew install ffmpeg \ | |
--with-chromaprint \ | |
--with-fdk-aac \ | |
--with-fontconfig \ | |
--with-freetype \ | |
--with-frei0r \ | |
--with-game-music-emu \ | |
--with-libass \ |
export http_proxy=http://<ip/name>:<port>
export https_proxy=$http_proxy
System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go
directory by:
First install Brew on your MAC
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew tap homebrew/dupes
brew tap homebrew/php
brew install php70
mcrypt
: brew install mcrypt php70-mcrypt
brew install composer
package main | |
// More info on Getwd() | |
// https://golang.org/src/os/getwd.go | |
// | |
import( | |
"os" | |
"fmt" | |
"log" | |
) |