#Using dos2unix Replacing the original file:
dos2unix filename
Creating a .bak copy of the original:
dos2unix -b filename
#Using tr command
| javascript:(function(){ | |
| var link = document.createElement( 'a' ); link.style.display = 'none'; document.body.appendChild( link ); | |
| function save( blob, filename ) { link.href = URL.createObjectURL( blob ); link.download = filename; link.click(); } | |
| function saveString( text, filename ) { save( new Blob( [ text ], { type: 'application/json' } ), filename );} | |
| var script=document.createElement('script'); | |
| script.src='https://threejs.org/examples/js/exporters/GLTFExporter.js'; | |
| script.onload = function () { | |
| var exporter = new THREE.GLTFExporter(); |
| { | |
| "asset": { | |
| "version": "2.0", | |
| "generator": "THREE.JS GLTFExporter" | |
| }, | |
| "scenes": [ | |
| { | |
| "nodes": [ | |
| 0, | |
| 1, |
| /* globals AFRAME THREE */ | |
| AFRAME.registerBrush('spheres', { | |
| init: function (color, width) { | |
| // Initialize the material based on the stroke color | |
| this.material = new THREE.MeshStandardMaterial({ | |
| color: this.data.color, | |
| roughness: 0.5, | |
| metalness: 0.5, | |
| side: THREE.DoubleSide, | |
| shading: THREE.FlatShading |
| BrushInterface.prototype = { | |
| addPoint: function (position, orientation, pointerPosition, pressure, timestamp) {}, | |
| tick: function (timeoffset, delta) {} | |
| } |
| 1 - Oculus Rift CV1, Oculus VR | |
| displayId: 1 | |
| displayName: Oculus Rift CV1, Oculus VR | |
| isConnected: true | |
| isPresenting: false | |
| capabilities: | |
| hasOrientation: true | |
| hasPosition: true | |
| hasExternalDisplay: true |
| for i in *.CR2; do sips -s format jpeg $i --out "${i%.*}.jpg"; done |
| ### Aliases | |
| # Open specified files in Sublime Text | |
| # "s ." will open the current directory in Sublime | |
| alias s='open -a "Sublime Text"' | |
| alias d='cd /Volumes/SECUNDARIO' | |
| alias gd='cd Volumes/SECUNDARIO/MIO/Google\ Drive/' | |
| #alias ogc='open -a Google\ Chrome --args --disable-web-security' | |
| alias ogc='open -a Google\ Chrome' |
| class XmlUtils | |
| { | |
| function removeChildren(&$node) | |
| { | |
| while ($node->firstChild) | |
| { | |
| while ($node->firstChild->firstChild) | |
| { | |
| XmlUtils::removeChildren($node->firstChild); | |
| } |
| # Add it to your ~/.zshrc | |
| encrypt () { openssl des3 -in $1 -out $1.encrypted } | |
| decrypt () { FILENAME=$(echo $1|sed -e 's/\.encrypted$//g'); openssl des3 -d -in $1 -out $FILENAME } |
#Using dos2unix Replacing the original file:
dos2unix filename
Creating a .bak copy of the original:
dos2unix -b filename
#Using tr command