uname -a # Display Linux System Information
uname -r # Display kernel release information
uptime # Show how long the system has been running + load
hostname # Show system host name
hostname -i # Display the IP address of the host
last reboot # Show system reboot history
date # Show the current date and time
🏴☠️
This file contains 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
# THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG | |
# PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT. | |
# | |
# | |
# Libraries and infrastructure | |
sudo apt update -y | |
sudo apt install -y \ | |
docker.io docker-buildx \ | |
build-essential pkg-config autoconf bison rustc cargo clang \ |
This file contains 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
/** | |
* Converts a snake case string to title case. | |
* Example: snake_case => Snake Case | |
* | |
* @param {String} str the string to convert | |
* @return {String} | |
*/ | |
Vue.filter('snakeToTitle', function (str) { | |
return str.split('_').map(function (item) { | |
return item.charAt(0).toUpperCase() + item.substring(1); |
This file contains 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 | |
$sites = "http://www.broadcastsolutions.com.au/ | |
http://www.kvm.com.au/ | |
http://www.ambertech.com.au/"; | |
$sites = preg_split('/\r\n|\r|\n/', $sites); | |
echo " |
This file contains 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
# | |
# After running cap deploy:cold, You'll need to remove all files from the | |
# domains/yourdomain.com/html directory and turn the html directory into a | |
# symlink that links to ./current which is also a symlink setup by capistrano. | |
# | |
# install the mt-capistrano gem, not sure if it is really needed in most situations | |
require 'mt-capistrano' | |
# Configure these |
This file contains 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 | |
$birthday = '01/01/1970'; | |
$age = DateTime::createFromFormat('m/d/Y', $birthday) | |
->diff(new DateTime('now')) | |
->y; |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
This file contains 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
// Uses AMD or browser globals to create a jQuery plugin. | |
/** | |
* Name - jQuery Plugin | |
* | |
* Version: 0.0.1 (5/25/2012) | |
* Requires: jQuery v1.7+ | |
* | |
* Copyright (c) 2011 User - http://github.com/username | |
* Under MIT and GPL licenses: |
This file contains 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
/*! | |
Copyright (c) 2012 Ryan Grove. All rights reserved. | |
Redistribution and use of this software in source and binary forms, with or | |
without modification, are permitted provided that the following conditions are | |
met: | |
* Redistributions of source code must retain the above copyright notice, this | |
list of conditions and the following disclaimer. |
This file contains 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 watch = require('watch'), | |
spawn = require('child_process').spawn, | |
queue = [], | |
proc; | |
function run(path) { | |
if (proc) { | |
return queue.push(path); | |
} |
NewerOlder