apt-get update
apt-get upgrade
apt-get install build-essential
| # Add NVIDIA package repositories | |
| wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin | |
| sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600 | |
| sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub | |
| sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /" | |
| sudo apt-get update | |
| wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2004/x86_64/nvidia-machine-learning-repo-ubuntu2004_1.0.0-1_amd64.deb | |
| sudo apt install ./nvidia-machine-learning-repo-ubuntu2004_1.0.0-1_amd64.deb |
| #!/bin/sh | |
| # In case df shows >90% for /boot run: | |
| #sudo apt-get autoremove | |
| # Add repository | |
| sudo add-apt-repository ppa:ondrej/php | |
| # Install required packages | |
| sudo apt-get update |
| # save it as /etc/profile.d/ssh-telegram.sh | |
| # use jq to parse JSON from ipinfo.io | |
| # get jq from here http://stedolan.github.io/jq/ | |
| USERID="<target_user_id>" | |
| KEY="<bot_private_key>" | |
| TIMEOUT="10" | |
| URL="https://api.telegram.org/bot$KEY/sendMessage" | |
| DATE_EXEC="$(date "+%d %b %Y %H:%M")" | |
| TMPFILE='/tmp/ipinfo-$DATE_EXEC.txt' | |
| if [ -n "$SSH_CLIENT" ]; then |
| var mediaJSON = { "categories" : [ { "name" : "Movies", | |
| "videos" : [ | |
| { "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
| "sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
| "subtitle" : "By Blender Foundation", | |
| "thumb" : "images/BigBuckBunny.jpg", | |
| "title" : "Big Buck Bunny" | |
| }, | |
| { "description" : "The first Blender Open Movie from 2006", | |
| "sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
| (function (root, factory) { | |
| if ( typeof define === 'function' && define.amd ) { | |
| define([], factory(root)); | |
| } else if ( typeof exports === 'object' ) { | |
| module.exports = factory(root); | |
| } else { | |
| root.myPlugin = factory(root); | |
| } | |
| })(typeof global !== "undefined" ? global : this.window || this.global, function (root) { |
| <?php | |
| use ArrayAccess; | |
| use Countable; | |
| use IteratorAggregate; | |
| class DataContainer implements ArrayAccess, Countable, IteratorAggregate | |
| { | |
| use DataContainerTrait; | |
| } |
| <?php | |
| /** | |
| * UserAgentDetector | |
| * | |
| * @author Exadra37 | |
| * @license Free to use at your own risk. Provided as it is, without any warranty that will work for you. | |
| * @link http://presta-hosting.com | |
| * @version 1.0.1 | |
| * @since v.1.0.0 - 09/03/2014 |
| #!/usr/bin/env bash | |
| # script: watch | |
| # author: Mike Smullin <mike@smullindesign.com> | |
| # license: GPLv3 | |
| # description: | |
| # watches the given path for changes | |
| # and executes a given command when changes occur | |
| # usage: | |
| # watch <path> <cmd...> | |
| # |
| <?php | |
| //simple class to convert number to words in php based on http://www.karlrixon.co.uk/writing/convert-numbers-to-words-with-php/ | |
| if ( !class_exists('NumbersToWords') ){ | |
| /** | |
| * NumbersToWords | |
| */ | |
| class NumbersToWords{ | |
| public static $hyphen = '-'; | |
| public static $conjunction = ' and '; |