Skip to content

Instantly share code, notes, and snippets.

View codrin-iftimie's full-sized avatar

Codrin Iftimie codrin-iftimie

View GitHub Profile
blueprint:
name: Zigbee2MQTT - Tuya Moes Smart Knob (Operation Mode = event)
description: Automate your Tuya Smart Knob - ERS-10TZBVK-AA
domain: automation
input:
mode:
name: Automation Modes
description: "https://www.home-assistant.io/docs/automation/modes/"
default: parallel
selector:
// Disclaimer: not actual code
// actions/login.js
import authService from "services/authService"
import {getLoginInfo} from "selectors/login"
export function login() {
return function thunk(dispatch, getState) {
const data = getLoginInfo(getState());
if (!data.username) {
notifications.show({message: "Please enter an email"})
// Disclaimer: not actual code
import history from "services/history"
import store from "services/store"
import api from "services/api"
class AuthService {
constructor() {
this.tokenRefresher = throttle(this.refreshToken, 4 * 60 * 1000);
}
import csjs from "csjs";
const pink = "#c74d5a";
const white = "#fff";
export default csjs`
.simple-button {
background-color: ${pink};
border-radius: 3px;
color: ${white};
@codrin-iftimie
codrin-iftimie / perfectelementary.bash
Created January 28, 2016 23:08
HowTo Install the perfect Elementary-OS
#Download Elementary OS from here:
#http://sourceforge.net/projects/elementaryos/files/stable/
#First you update your system
sudo apt-get update && sudo apt-get dist-upgrade
#Install Google Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
//manager.js
var _ = require("lodash");
function StatusManager(){
this.componentsStatus = {};
}
_.extend(StatusManager.prototype, {
getStatus: function(identifier) {
return this.componentsStatus[identifier];
},
setStatus: function(identifier, newStatus) {
var Checkbox = React.createClass({
render: function(){
return (
<div>I will be a check box</div>
);
}
})