$ uname -r
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
| Visual Studio Code frequently crashes linux. Using NVIDIA GPU | |
| 1. Open command pallete (Ctrl + Shift + P) | |
| 2. Enter "Preferences: Configure Runtime Arguments" | |
| 3. Add config: "disable-hardware-acceleration": true | |
| 4. Restart VS Code |
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
| var fs = require("fs") | |
| var ssl_options = { | |
| key: fs.readFileSync('privatekey.pem'), | |
| cert: fs.readFileSync('certificate.pem') | |
| }; | |
| var port = process.env.PORT || 3000; | |
| var express = require('express'); | |
| var ejs = require('ejs'); | |
| var passport = require('passport') |
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
| #===================================================================== | |
| #The default CPU CFS (Completely Fair Scheduler) period is 100ms, usually --cpu-period should work with --cpu-quota | |
| #By default, a container can use all available CPU resources, which corresponds to a --cpu-quota value of -1 | |
| docker run -it --cpu-quota=-1 ubuntu:20.04 /bin/bash | |
| #If there is 1 CPU, this means the container can get 50% CPU worth of run-time every 50ms. | |
| docker run -it --cpu-period=50000 --cpu-quota=25000 ubuntu:20.04 /bin/bash | |
| #If there is 1 CPU, As the default value of --cpu-period is 100000, setting the value of --cpu-quota to 25000 limits a container to 25% of the CPU resources | |
| docker run -it --cpu-quota=25000 ubuntu:20.04 /bin/bash | |
| #On a 2-CPU system `--cpus 1.5` means the container will take 75% (1.5/2) of the CPU share. | |
| docker run -it --cpus 1.5 ubuntu:20.04 /bin/bash |
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
| <? | |
| // <readme> | |
| /* | |
| This is a lite version of Olark's and Intercom's functionality (without the chat part). | |
| It lets you get feedback from users on your site to your email. | |
| And you won't have to rely on another company anymore! | |
| #killyourdependencies |
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
| <?php | |
| /* | |
| I wrote this function to progressively obfuscate text in MAKEbook.io. When it KINDA worked, I just used it. | |
| It can take a lot of improvement. I kinda just tweaked the values until it was good enough. It's not SO progressive though. | |
| It takes all the output of your PHP scripts via ob_start(), reroutes that to the obfuscation function. | |
| You should check if user paid for book or not, then either run ob_start or not! | |
This collection of files serves as a simple static demonstration of how to post to a google spreadsheet from an external html <form> following the example by Martin Hawksey
You should be able to just open index.html in your browser and test locally.
However if there are some permissions errors you can make a quick html server with python. Open terminal and cd to the directory where the gist files are located and enter python -m SimpleHTTPServer. By default this creates a local server at localhost:8000