Skip to content

Instantly share code, notes, and snippets.

View simonjodet's full-sized avatar

Simon Jodet simonjodet

View GitHub Profile
@simonjodet
simonjodet / ngselectonfocus.js
Created June 10, 2014 15:04
Angular directive to select the content of a textarea when it's focused
'use strict';
angular.module('myApp').directive(
'ngSelectOnFocus',
function() {
var factory = {
restrict: 'A',
link: function postLink(scope, element) {
$(element).focus(function(event) {
event.target.select();
<!DOCTYPE HTML>
<html lang="en" ng-app="myApp">
<head>
<meta charset="utf-8">
<title>Dynamic Pagination w/ Filtering</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="Kim Maida">
<!-- JS Libraries -->
@simonjodet
simonjodet / HOWTO.md
Last active December 11, 2018 00:09
Quick audio interface switch for Mac OS
  1. Create a /usr/local/bin/audiointerfaceswitch.sh file with the content above. Change "FiiO USB DAC-E10" with the name of your interface. Run /usr/local/bin/SwitchAudioSource -a to get a list of the available interfaces on your system.
  2. With Automator.app, create an app
  3. Run the app to switch interfaces. Use a launcher or BetterTouchTool or a similar tool to map the app to a keyboard shortcut.

Keybase proof

I hereby claim:

  • I am simonjodet on github.
  • I am neuromancer99 (https://keybase.io/neuromancer99) on keybase.
  • I have a public key ASC6ffhtTtuMPlVmCjlRYHxKxLshVQDXJ5fHZDL_mtkKuwo

To claim this, I am signing this object:

blueprint:
name: Thermostat TPI
description: Thermostat TPI (Time Propertional & Integral)
domain: automation
input:
coeff_c:
name: Coefficient C
description: coefficient multiplicateur de la différence entre la consigne et la température intérieure pour le calcul de la puissance (0.6 conseillé)
selector: