> wsl -d docker-desktop
> sysctl -w vm.max_map_count=262144
This file contains hidden or 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
package main | |
import ( | |
"errors" | |
"fmt" | |
"math" | |
"time" | |
) | |
func main() { |
This file contains hidden or 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
const readline = require('readline'); | |
const fs = require('fs'); | |
const path = require('path'); | |
function main() { | |
const args = process.argv; | |
if (args.length <= 2) { | |
console.log('required pem file argument'); | |
process.exit(1); | |
} |
This file contains hidden or 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
const https = require('https'); | |
const axios = require('axios'); | |
const fs = require('fs'); | |
const httpsAgent = new https.Agent({ | |
requestCert: true, | |
rejectUnauthorized: true, | |
ca: [fs.readFileSync('./root_cert.pem')], | |
// cert: [fs.readFileSync('./cert.pem')] | |
}); |
This file contains hidden or 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
version: '3' | |
services: | |
redis: | |
image: "redis:3.0-alpine" | |
command: redis-server --requirepass devpass | |
volumes: | |
- "./volumes/redis:/data" | |
ports: | |
- "6379:6379" |
This file contains hidden or 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
// [START initialize_firebase_in_sw] | |
// Give the service worker access to Firebase Messaging. | |
// Note that you can only use Firebase Messaging here, other Firebase libraries | |
// are not available in the service worker. | |
importScripts('https://www.gstatic.com/firebasejs/3.5.2/firebase-app.js'); | |
importScripts('https://www.gstatic.com/firebasejs/3.5.2/firebase-messaging.js'); | |
// Initialize the Firebase app in the service worker by passing in the | |
// messagingSenderId. | |
firebase.initializeApp({ |
This file contains hidden or 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
// wuriyanto 2022 | |
package main | |
import "fmt" | |
func main() { | |
var year uint32 = 1990 | |
var month uint32 = 10 | |
var day uint32 = 13 |
https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html
install Mysql Server
$ sudo apt install mysql-server
login as mysql super user
> sudo mysql
https://www.postgresql.org/docs/current/pgcrypto.html#id-1.11.7.35.8
- login as superuser
$ sudo --login --user postgres
- connect to specific Database
$ \c database_name;
This file contains hidden or 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
const { google } = require('googleapis'); | |
const fs = require('fs'); | |
const analyticsreporting = google.analyticsreporting('v4'); | |
const setAuth = () => { | |
// Obtain user credentials to use for the request | |
const auth = new google.auth.GoogleAuth({ | |
keyFile: 'your_service_account.json', | |
scopes: ['https://www.googleapis.com/auth/analytics'] |