You can bind the /etc volume into docker like that:
docker run -it --rm -v /etc:/etc_host ubuntu bash
You gained root access. Then you can change the permissions of /etc_host/sudoers to 777:
chmod 777 /etc_host/sudoers
server { | |
listen 443 ssl; | |
server_name storage.mydomain.co; | |
# ssl | |
ssl_certificate /home/ubuntu/ssl/storage.mydomain.co/server.crt; | |
ssl_certificate_key /home/ubuntu/ssl/storage.mydomain.co/server.key; | |
# To allow special characters in headers | |
ignore_invalid_headers off; |
You can bind the /etc volume into docker like that:
docker run -it --rm -v /etc:/etc_host ubuntu bash
You gained root access. Then you can change the permissions of /etc_host/sudoers to 777:
chmod 777 /etc_host/sudoers
Install pytorch CPU only
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
Install pytorch GPU
pip3 install torch torchvision torchaudio
import requests | |
import ujson as json | |
header ={ | |
'PRIVATE-TOKEN': 'your_token' | |
} | |
def get_commits_by_user(project_id, email, since, until, branch): | |
json_loads_of_commit = [] | |
params = { | |
"since": since, |
package main | |
import ( | |
"fmt" | |
"io" | |
"net/http" | |
"net/url" | |
"os" | |
) |
const readline = require('readline'); | |
const fs = require('fs'); | |
const path = require('path'); | |
// this function will convert json file to .env | |
// USAGE: | |
// => node ./scripts/json_to_env.js env.json | |
function main() { | |
const args = process.argv; | |
if (args.length <= 2) { |
sudo sed -i '' -e "s/true/false/g" /Library/LaunchAgents/com.paloaltonetworks.gp.pangpa.plist |
import requests | |
import json | |
api_key = "" | |
cx = "" | |
query = "pertamina berita" | |
url = f"https://www.googleapis.com/customsearch/v1?key={api_key}&cx={cx}&q={query}" | |
response = requests.get(url) | |
data = json.loads(response.text) |
const fs = require('fs'); | |
const qrcode = require('qrcode'); | |
const { rsa, rsaSign } = require('crypsi'); | |
const { PDFDocument } = require('pdf-lib'); | |
const main = () => { | |
return new Promise((resolve, reject) => { | |
const privateKeyData = fs.readFileSync('private_key_pkcs8.key'); | |
const publicKeyData = fs.readFileSync('public.key'); | |
const pdfBuffer = fs.readFileSync('pdf_file.pdf'); |
import os | |
import json | |
from google.analytics.data_v1beta import BetaAnalyticsDataClient | |
from google.analytics.data_v1beta.types import ( | |
DateRange, | |
Dimension, | |
Metric, | |
RunReportRequest, | |
) |