- sudo -i
- cd /var
- dd if=/dev/zero of=swap.file bs=1M count=2048
- mkswap swap.file
- chmod 600 swap.file
- swapon swap.file
- // copy UUID
- vi /etc/fstab ==>
UUID=f1ed55b6-357b-4427-86c8-d57f034cf29e none swap defaults 0 0
- mount -a
- echo $? // should be 0 if everything is OK
This file contains 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
#!/bin/bash -eux | |
# This is a very simple example on how to bundle a Python application as an AppImage | |
# using virtualenv and AppImageKit using Ubuntu | |
# NOTE: Please test the resulting AppImage on your target systems and copy in any additional | |
# libraries and/or dependencies that might be missing on your target system(s). | |
######################################################################## | |
# Get virtualenv on the target system | |
######################################################################## |
This file contains 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
#!/bin/bash | |
set -ex | |
cd `dirname $0` | |
cd .. | |
ROOT_DIR=$(pwd) | |
APP=utest | |
LOWERAPP=${APP,,} |
This file contains 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
openssl pkcs7 -in mycert.p7b -inform DER -print_certs -out mycert.pem | |
sudo cp mycert.pem /etc/pki/ca-trust/source/anchors/ | |
sudo update-ca-trust |
This file contains 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
lsblk | |
umount /dev/sdc | |
sudo fdisk /dev/sdc | |
d,d,d,d,... | |
n | |
w | |
sudo mkfs.vfat /dev/sdc1 | |
sudo dd if=/path/to/ubuntu.iso of=/dev/sdb bs=1M |
This file contains 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
#!/bin/bash | |
docker run \ | |
--rm \ | |
-d \ | |
--name geth \ | |
-v $(pwd)/.ethereum:/root/.ethereum \ | |
-p 8545:8545 \ | |
ethereum/client-go \ | |
--rinkeby \ |
This file contains 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
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]' | |
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]' |
This file contains 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
import React, { Component } from 'react' | |
import Helmet from 'react-helmet' | |
import QrCode from 'qrcode.react' | |
import { uploadImage, addJson, getJson, getIpfsHashFromBytes32, getBytes32FromIpfsHash } from '../utils/ipfs' | |
import './ipfs.css' | |
export default class Ipfs extends Component { | |
constructor(props) { | |
super(props) |