Skip to content

Instantly share code, notes, and snippets.

View carloscasalar's full-sized avatar
💜
Helping make cities a better place to live at @cabify

Carlos Castillo carloscasalar

💜
Helping make cities a better place to live at @cabify
View GitHub Profile
@carloscasalar
carloscasalar / background.js
Created March 14, 2019 06:51 — forked from muralikg/background.js
puppeteer screen capture demo. Currently records 10 second video. Change the timeout in background.js with your own logic to stop the recording when necessary. Try with `node export.js`
/* global chrome, MediaRecorder, FileReader */
chrome.runtime.onConnect.addListener(port => {
let recorder = null
port.onMessage.addListener(msg => {
console.log(msg);
switch (msg.type) {
case 'REC_STOP':
console.log('Stopping recording')
if (!port.recorderPlaying || !recorder) {
@carloscasalar
carloscasalar / tipsMySqlMariaDb.md
Created January 28, 2019 10:32
MySql / MariaDB links and tips
@carloscasalar
carloscasalar / tipsAWSLambda.md
Last active January 13, 2019 09:32
AWS lambda links and tips
@carloscasalar
carloscasalar / hello.sh
Created October 19, 2018 06:58
bash links and tips
#!/bin/bash
echo -e "What's your name?"
read name
echo "Hello $name!"
@carloscasalar
carloscasalar / tipsRxJS.md
Created September 28, 2018 06:57
RxJS Links and tips
@carloscasalar
carloscasalar / tipsPWA.md
Created September 28, 2018 04:37
PWA Links and tips
@carloscasalar
carloscasalar / playground.rs
Last active July 30, 2018 15:50 — forked from rust-play/playground.rs
Sample usage of associative type in rust
pub trait Point{
type Identifier: PartialEq;
fn id(&self) -> Self::Identifier;
}
#[derive(Debug)]
pub struct Connection<T: Point> {
pub to: T
}