$ docker
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
| import NextLink from 'next/link'; | |
| import React from 'react'; | |
| import { Text } from 'react-native-web'; | |
| // https://github.com/zeit/next.js#with-link | |
| // Combines the Next.js <Link> with React Native's <Text> component. | |
| // Enables use like this: | |
| // | |
| // <Link | |
| // href={href} |
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
| license: mit |
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
| // https://stackoverflow.com/questions/51609922/how-to-drill-down-charts-with-chartjs | |
| // https://stackoverflow.com/questions/26257268/click-events-on-pie-charts-in-chart-js | |
| $(document).ready(function() { | |
| var canvas = document.getElementById("myChart"); | |
| var ctx = canvas.getContext("2d"); | |
| var myNewChart = new Chart(ctx, { | |
| type: 'pie', | |
| data: data | |
| }); |
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
| go-mysql-json-ex/ | |
| |-- dbm/ // contains all database related operations | |
| | |-- internal/ // internal only accessible to dbm | |
| | | |-- base.go // contains db conf, manager | |
| | | |-- prepsql.go // all prepared statements used in entire app | |
| | |-- conn.go // db init, close API call | |
| | |-- delete.go // delete db resource APIs | |
| | |-- get.go // get db resource APIs | |
| | |-- insert.go // insert db resource APIs | |
| | |-- models.go // models in go representing db tables structrure |
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 ( | |
| "database/sql" | |
| "encoding/json" | |
| "fmt" | |
| "log" | |
| "time" | |
| "github.com/go-sql-driver/mysql" |
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
| # Add to file: /etc/fail2ban/jail.local | |
| [nginx-badbots] | |
| enabled = true | |
| port = http,https | |
| filter = nginx-badbots | |
| logpath = %(nginx_access_log)s | |
| maxretry = 1 | |
| findtime = 604800 | |
| bantime = 604800 |
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 ( | |
| "crypto/hmac" | |
| "crypto/sha256" | |
| "encoding/hex" | |
| "fmt" | |
| "net/http" | |
| ) |
Note:
When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.
If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code:
- Babel lets you use newer JavaScript language features, and outputs equivalent code that targets older JavaScript engines.
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
| # Make sure you grab the latest version | |
| curl -OL https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip | |
| # Unzip | |
| unzip protoc-3.5.1-linux-x86_64.zip -d protoc3 | |
| # Move protoc to /usr/local/bin/ | |
| sudo mv protoc3/bin/* /usr/local/bin/ | |
| # Move protoc3/include to /usr/local/include/ |