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
| sass-convert -R ./ -F sass -T scss && rm *.sass |
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
| # Assuming an Ubuntu Docker image | |
| $ docker run -it <image> /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
| 'use strict'; | |
| // simple express server | |
| var express = require('express'); | |
| var app = express(); | |
| var router = express.Router(); | |
| app.use(express.static('public')); | |
| app.get('/', function(req, res) { | |
| res.sendfile('./public/index.html'); |
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
| That’s one of the real strengths of Docker: the ability to go back to a previous commit. The secret is simply to docker tag the image you want. | |
| Here’s an example. In this example, I first installed ping, then committed, then installed curl, and committed that. Then I rolled back the image to contain only ping: | |
| $ docker history imagename | |
| IMAGE CREATED CREATED BY SIZE | |
| f770fc671f11 12 seconds ago apt-get install -y curl 21.3 MB | |
| 28445c70c2b3 39 seconds ago apt-get install ping 11.57 MB | |
| 8dbd9e392a96 7 months ago 131.5 MB |
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
| # first: | |
| lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done | |
| sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.* | |
| # To recap, the best way (I've found) to completely uninstall node + npm is to do the following: | |
| # go to /usr/local/lib and delete any node and node_modules | |
| cd /usr/local/lib | |
| sudo rm -rf node* |
The goal of this is to have an easily-scannable reference for the most common syntax idioms in JavaScript and Rust so that programmers most comfortable with JavaScript can quickly get through the syntax differences and feel like they could read and write basic Rust programs.
What do you think? Does this meet its goal? If not, why not?
JavaScript:
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
| #!/bin/bash | |
| #@cecekpawon - thrsh.net | |
| sudo kextunload /System/Library/Extensions/CUDA.kext | |
| sudo rm -rf /usr/local/cuda | |
| sudo rm -rf /System/Library/StartupItems/CUDA | |
| sudo rm -rf /System/Library/Extensions/CUDA.kext | |
| sudo rm -rf /Library/Preferences/com.nvidia.cuda* | |
| sudo rm -rf /Library/PreferencePanes/CUDA\ Preferences.prefPane | |
| sudo rm -rf /Library/LaunchAgents/com.nvidia.CUDASoftwareUpdate.plist |
Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.
- ⌘ : Command key
- ⌃ : Control key
- ⌫ : Delete key
- ← : Left arrow key
- → : Right arrow key
- ↑ : Up arrow key
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
| # Source internet | |
| # Use at your own risk, test on localhost first | |
| # Ovrride Default index.php | |
| DirectoryIndex home.php | |
| # Prevent access to some files | |
| <FilesMatch "^(wp-config.php|readme.html|license.txt|README.md|.gitignore|.gitattributes|.htaccess|error_log)"> | |
| Order allow,deny | |
| Deny from all |

