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
# /usr/local/bin/audio-device-switch.sh | |
acerAudio="alsa_output.usb-0c76_USB_PnP_Audio_Device-00.analog-stereo" | |
laptopAudio="alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink" | |
isLaptop=$(wpctl status | grep "0. Audio/Sink" | grep "pci") | |
isAcer=$(wpctl status | grep "0. Audio/Sink" | grep "usb") | |
nextaudio=laptopAudio | |
if [[ "$isLaptop" != "" ]]; then |
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 inspect | |
import os | |
import re | |
import shlex | |
import subprocess | |
from terminatorlib import plugin, config | |
AVAILABLE = ['OpenFileInVSCode'] | |
class OpenFileInVSCode(plugin.URLHandler): |
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
var UKLON_TAX = 12; | |
var UBER_TAX = 7; | |
var ON_TAXI_TAX = 9; | |
var CARD_TAX = 2.5; | |
var FUEL_COST = 31; | |
var FUEL_AVG = 10.5; | |
var t = '\ | |
body{margin:0}\ | |
h1, h3 {\ |
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
'use strict'; | |
const linter = require('ember-template-lint'); | |
const Rule = linter.Rule; | |
const helpers = linter.ASTHelpers; | |
const tagNames = [ | |
"a", | |
"abbr", | |
"acronym", | |
"address", |
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 convertReducers = (reducersObject) => { | |
const newReducers = {}; | |
console.log(reducersObject); | |
Object.keys(reducersObject).forEach((reducerName) => { | |
const { defaultState, reducers } = reducersObject[reducerName]; | |
newReducers[reducerName] = (state, action) => { | |
if (/^@/.test(action.type)) { | |
return state || defaultState || {}; | |
} |
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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
arr: [1,2,3], | |
var: 'x' | |
}); |
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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
actions: { | |
push(){ | |
} | |
} | |
}); |
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 Ember from 'ember'; | |
import EmberObject from '@ember/object'; | |
const myArr = [1,2,3,4,5].map(i => EmberObject.create({name: 'Name'+i, age: (i+1)*10})); | |
const someData = { | |
myArr | |
}; | |
export default Ember.Controller.extend({ | |
someData, |
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 Ember from 'ember'; | |
import { computed } from '@ember/object'; | |
const stateA = 'A'; | |
const stateB = 'B'; | |
const computedSome = (propName, ...criterias) => computed(propName, function() { | |
const prop = this.get(propName); | |
return criterias.some(c => c === prop); | |
}); |
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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
callMe(){ | |
alert('111'); | |
} | |
}); |
NewerOlder