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
console.profile(); | |
let i = 0; | |
let id = setInterval(() => { | |
const url = ++i % 2 ? '/details/52176516' : '/details/52262234'; | |
store.dispatch({ type: '@@history/NAVIGATE', url }); | |
if (i > 25) { | |
clearInterval(id); | |
console.profileEnd(); | |
alert('Profiling complete!'); | |
} |
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
diskutil erasevolume HFS+ 'TSRAM' `hdiutil attach -nomount ram://4194304` | |
cd /Volumes/TSRAM && pwd | |
git clone [email protected]:trendsales/frontend-architecture.git | |
cd frontend-architecture && pwd | |
npm install | |
./sync.sh |
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
.hairlines(@border) { | |
border-width: @border; | |
.subpixel-support & { | |
border-width: ~`"@{border}".replace(/1px/g, "0.5px").replace(/[\[\],]/g, '')`; | |
} | |
} | |
.border-a { | |
.hairlines(2px 1px 0px 10px); | |
} | |
.border-b { |
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
function inherits(Parent, Child) { | |
function F() {} | |
F.prototype = Parent; | |
Child.prototype = new F(); | |
}; | |
var VanillaClass = function () { | |
var self = this; | |
self.name = "VanillaClass"; | |
self.listeners = {}; |
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
call "C:\Program Files\Microsoft SDKs\Windows\v7.1\bin\Setenv.cmd" /Release /x86 | |
call "C:\Program Files\Microsoft SDKs\Windows\v7.1\bin\Setenv.cmd" /Release /x64 |
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
* { | |
font-family: Arial, Helvetica, sans-serif; | |
font-size: 12px; | |
line-height: 1.4em; | |
} | |
.head { | |
font-size: 36px; | |
word-spacing: -0.05em; | |
letter-spacing: -3px; |
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
$("#button").click($.proxy(function () { | |
//use original 'this' | |
},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
import serial | |
from time import sleep | |
usb_ports = ('/dev/ttyUSB0', '/dev/ttyUSB1') | |
while 1: | |
for usb in usb_ports: | |
try: | |
#print('Connecting to arduino at ' + usb) | |
auduino = serial.Serial(usb, 9600) |