git diff --name-only HEAD~1 HEAD | xargs tar -czf files.tar.gz
git diff --name-only HEAD~1 HEAD | > files.txt
#to get the hash of the current commit
git rev-parse HEAD
var infinteNumber = [4, 0, 20, 42,]; | |
var magicNumberList = {}; | |
var isMagic = function(num){ | |
if(magicNumberList[num]) | |
return true; | |
var stringNum = num.toString(); | |
var arrayOfDigits = stringNum.split("") | |
console.log (num) | |
var magicNumberTotal = 0; | |
for(var i = 0; i < stringNum.length; i++){ |
git diff --name-only HEAD~1 HEAD | xargs tar -czf files.tar.gz
git diff --name-only HEAD~1 HEAD | > files.txt
#to get the hash of the current commit
git rev-parse HEAD
{ | |
"installed_packages": | |
[ | |
"DocBlockr", | |
"Emmet", | |
"Sass", | |
"SideBarEnhancements", | |
"SublimeLinter", | |
"SublimeLinter-coffee", | |
"SublimeLinter-jshint", |
class ListNode { | |
val: number | null; | |
next: ListNode | null; | |
constructor(numbers: Array<number>) { | |
for (var i = 0; i < numbers.length; i++) { | |
this.val = numbers[0]; | |
if (i + 1 === numbers.length) { | |
this.next = null; | |
} else { | |
this.next = new ListNode(numbers.splice(i + 1)); |
var numberOutofBounds = (numbers: Array<string>) => { | |
if (numbers.length > 10) { | |
return true; | |
} | |
if (numbers.length <= 9) { | |
return false; | |
} | |
// | |
//2, 147, 483, 648; | |
const bounds = { |
var findMedianSortedArrays = (nums1: Array<number>, nums2: Array<number>) => { | |
const newArray = nums1.concat(nums2); | |
newArray.sort((a, b) => { | |
if (a < b) { | |
return -1; | |
} | |
if (a > b) { | |
return 1; | |
} | |
if (a === b) { |
const longestPalindrome = (s: string) => { | |
const length = s.length; | |
var result = ""; | |
if (length === 1) { | |
return s; | |
} | |
var fromTheCenter = (left, right) => { | |
while (left >= 0 && right < length && s[left] === s[right]) { | |
left--; |