Skip to content

Instantly share code, notes, and snippets.

@selahssea-zz
selahssea-zz / arrayToLinkedList.js
Created November 20, 2017 18:44
Array to linked list in javascript
function ListNode(x) {
this.value = x;
this.next = null;
}
function SinglyList(){
this.head = null;
}
SinglyList.prototype.add = function(data) {
@selahssea-zz
selahssea-zz / exifclear.sh
Created October 29, 2017 10:18
Clear EXIF for files with exiftool
for i in *.jpg; do echo "Processing $i"; exiftool -all= "$i"; done
@selahssea-zz
selahssea-zz / show-hidden-files
Created January 9, 2017 13:10
Show Hidden Files on macos
defaults write com.apple.finder AppleShowAllFiles YES
@selahssea-zz
selahssea-zz / camera-fix.sh
Created December 24, 2016 12:37
Macbook Pro Camera doesn't work
sudo killall VDCAssistant
@selahssea-zz
selahssea-zz / alow-from-anywhere.sh
Created September 21, 2016 07:43
Allow apps downloaded from anywhere for macOS Sierra
#Allow apps downloaded from anywhere
sudo spctl --master-disable
@selahssea-zz
selahssea-zz / elcapitan.sh
Created January 21, 2016 08:52
Create bootable OS X El Capitan ISO
#!/bin/bash
# Mount the installer image
hdiutil attach /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
# Create the ElCapitan Blank ISO Image of 7316mb with a Single Partition - Apple Partition Map
hdiutil create -o /tmp/ElCapitan.cdr -size 7316m -layout SPUD -fs HFS+J
# Mount the ElCapitan Blank ISO Image
hdiutil attach /tmp/ElCapitan.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build
@selahssea-zz
selahssea-zz / open-chrome.sh
Last active November 20, 2018 13:17
Google Chrome disable web security (CORS) on Mac OS X
#!/bin/bash
open /Applications/Google\ Chrome\ Canary.app/ --args --disable-web-security
scutil --set HostName name-of-host
@selahssea-zz
selahssea-zz / image disk
Last active August 29, 2015 14:19
Write disk image in OS X
#find disk
$ diskutil list
#unmount it (check the number)
$ diskutil unmountDisk /dev/disk2
#format it (check the number)
$ sudo dd if=/dev/zero of=/dev/rdisk2 bs=1024 count=1
#write image to it (check .img name and disk number)
@selahssea-zz
selahssea-zz / index.html
Last active August 29, 2015 14:13
Выравнивание блоков по ширине
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>