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
# ------------------------------------ | |
# Docker Aliases | |
# ------------------------------------ | |
# Get latest container ID | |
alias dl="docker ps -l -q" | |
# Get running containers | |
alias dps="docker ps" | |
# Get all containers |
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
NEWUSER="my_new_user" | |
sudo mkdir -p /home/${NEWUSER}/.ssh && \ | |
sudo touch /home/${NEWUSER}/.ssh/authorized_keys && \ | |
sudo useradd -d /home/${NEWUSER} ${NEWUSER} && \ | |
sudo usermod -aG sudo ${NEWUSER} && \ | |
sudo chown -R ${NEWUSER}:${NEWUSER} /home/${NEWUSER}/ && \ | |
sudo chown root:root /home/${NEWUSER} && \ | |
sudo chmod 700 /home/${NEWUSER}/.ssh && \ | |
sudo chmod 644 /home/${NEWUSER}/.ssh/authorized_keys |
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
## Save Point | |
eyJ2ZXJzaW9uIjoxLjMsImZlYXR1cmVzIjp7ImxvY2F0aW9uIjp7InJvb20iOnRydWUsIm91dHNpZGUiOnRydWUsIndvcmxkIjp0cnVlfX0sInN0b3JlcyI6eyJ3b29kIjozMiwiZnVyIjo1MDAxLCJiYWl0IjoxNjQ3LCJ0ZWV0aCI6NjMsInNjYWxlcyI6MTA4LCJtZWF0IjoyNTUsImNsb3RoIjoxMjcsImNoYXJtIjo2LCJsZWF0aGVyIjozMDY3LCJjdXJlZCBtZWF0IjoxNiwiY29tcGFzcyI6MSwidG9yY2giOjEwLCJib25lIHNwZWFyIjowLCJ3YXRlcnNraW4iOjEsInJ1Y2tzYWNrIjoxLCJsIGFybW91ciI6MSwiaXJvbiI6MzI0NSwiYm9sYXMiOjAsImNhc2siOjEsIndhZ29uIjoxLCJpIGFybW91ciI6MSwiaXJvbiBzd29yZCI6MSwibWVkaWNpbmUiOjAsInN0ZWVsIHN3b3JkIjoxLCJzdGVlbCI6Mjc2LCJyaWZsZSI6MCwiYnVsbGV0cyI6MSwiZ3JlbmFkZSI6MCwibGFzZXIgcmlmbGUiOjAsImVuZXJneSBjZWxsIjowLCJiYXlvbmV0IjowLCJ0cmFwIjowLCJjYXJ0IjowLCJodXQiOjAsImxvZGdlIjowLCJ0cmFkaW5nIHBvc3QiOjAsInRhbm5lcnkiOjAsInNtb2tlaG91c2UiOjAsIndvcmtzaG9wIjowLCJzdGVlbHdvcmtzIjowLCJhcm1vdXJ5IjowLCJ3YXRlciB0YW5rIjoxLCJjb252b3kiOjEsInMgYXJtb3VyIjoxLCJjb2FsIjo0OX0sImNoYXJhY3RlciI6eyJwdW5jaGVzIjo1LCJzdGFydmVkIjoyLCJkZWh5ZHJhdGVkIjoxLCJwZXJrcyI6eyJzY291dCI6dHJ1ZX19LCJpbmNvbWUiOnsiZ2F0aGVyZXIiOnsiZGVsYXkiOjEwL |
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 maya.cmds as cmds | |
''' | |
Split joint chain between 2 joints (parent/child). | |
Usage Example: | |
jnts = cmds.ls(selection=True, type='joint') |
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 v = $('#video_html5_api')[0]; | |
var offsetTime = function (video, offset) { | |
video.currentTime = (video.currentTime + offset); | |
}; | |
var c = document.createElement('div'); | |
c.style.position="absolute"; | |
c.style.top="0"; | |
c.style.right="0"; | |
var createButton = function (video, label, offset) { | |
var b = document.createElement("button"); |
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
proc string[] getTransform(string $shape[]) { | |
string $transform[]; | |
for ($node in $shape) { | |
if ( "transform" != `nodeType $node` ) { | |
// If given node is already a transform, just pass on through | |
string $parents[] = `listRelatives -fullPath -parent $node`; | |
appendStringArray($transform, $parents, size($parents)); | |
} | |
} | |
return $transform; |
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
// Run this in the JS console, after logging into your GistBox | |
var gists = app.gists.models; | |
var data = []; | |
var i, ii, g, l; | |
for (i=0; i<gists.length; i++) { | |
gist = gists[i]; | |
g = {}; | |
g.id = gist.id; | |
g.url = gist.attributes.link_url; |
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
.grid .cell { | |
position: relative; | |
margin: 1rem 1rem 2rem; | |
} | |
@media screen and (min-width: 600px) { | |
.grid { | |
display: flex; | |
flex-wrap: wrap; | |
flex-direction: row; |
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 video_events = { | |
'abort' : 'abort : The loading of an audio/video is aborted', | |
'canplay' : 'canplay : The browser can start playing the audio/video', | |
'canplaythrough' : 'canplaythrough : The browser can play through the audio/video without stopping for buffering', | |
'durationchange' : 'durationchange : The duration of the audio/video is changed', | |
'emptied' : 'emptied : The current playlist is empty', | |
'ended' : 'ended : The current playlist is ended', | |
'error' : 'error : An error occurred during the loading of an audio/video', | |
'loadeddata' : 'loadeddata : The browser has loaded the current frame of the audio/video', | |
'loadedmetadata' : 'loadedmetadata : The browser has loaded meta data for the audio/video', |
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
# Find all files with uppercase extensions | |
find . -type f -regex '.*\.[A-Z]\{1,\}' | |
# Count all files with uppercase extensions | |
find . -type f -regex '.*\.[A-Z]\{1,\}' | wc -l | |
# Find all file extensions that exceed 2MB | |
find . -type f -name "*.*" -size +2M | sed 's|.*\.||' | sort -u |
NewerOlder