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
<link rel="import" href="../components/polymer/polymer.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
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 socket | |
import fcntl | |
import struct | |
import pyupm_i2clcd as lcd | |
def get_ip_address(ifname): | |
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
return socket.inet_ntoa(fcntl.ioctl( |
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
// pseudo code | |
const alias = 'environment' | |
(?<=from)((?!\'\.\/).)*?(?=alias) | |
or | |
(\.\.\/)+(?=alias) | |
//NOTE: I'am working with an angular cli project. So do the refactoring module by module in case you have to fix some issues due to import replacement |
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
const gulp = require('gulp'); | |
const csv = require('csv-parser'); | |
const fs = require('fs'); | |
const _ = require('lodash'); | |
const paths = { | |
translations: { | |
input: [ | |
'./translations/medics_translations.csv', |
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 { Directive, HostListener } from '@angular/core'; | |
import { NgModel } from '@angular/forms'; | |
import * as firebase from 'firebase'; | |
@Directive({ | |
selector: '[appFirestoreDatepickerAdapter]', | |
providers: [NgModel], | |
}) | |
export class FirestoreDatepickerAdapterDirective { |