Skip to content

Instantly share code, notes, and snippets.

Avatar
🍕
🚫 Not Eating Pizza

Deveedutta deveedutta

🍕
🚫 Not Eating Pizza
View GitHub Profile
@deveedutta
deveedutta / prettyDateUnixEpochTime.js
Last active Aug 18, 2016
JavaScript Pretty Date for Unix Epoch Time originally by John Resig
View prettyDateUnixEpochTime.js
/*
* JavaScript Pretty Date
* Copyright (c) 2011 John Resig (ejohn.org)
* Originally Licensed under the MIT and GPL licenses.
* Derivative work Copyright (c) 2016 Deveedutta Maharana (statusok200.wordpress.com)
* Derivative work under MIT and GPL and WTFPL licenses.
*/
// Takes a Unix Epoch Time and returns a string representing how
// long ago the date represents.
@deveedutta
deveedutta / oscillator.js
Last active Feb 19, 2019
oscillator component
View oscillator.js
import { h, Component } from 'preact';
import style from './style';
const audioContext = new (window.AudioContext || window.webkitAudioContext);
export default class Oscillator extends Component {
play() {
if( this.oscillator ) return;
@deveedutta
deveedutta / app.js
Created Oct 5, 2016
the main file of the app
View app.js
import { h, Component } from 'preact';
import Header from './header';
import Home from './home';
import Oscillator from './oscillator';
export default class App extends Component {
render() {
return (
<div id="app">
@deveedutta
deveedutta / chord.js
Created Oct 6, 2016
Chord React component that plays a combination of 3 oscillators to generate a Chord
View chord.js
// A Chord react (or call it preact) component that plays a combination of 3 oscillators
// And generates various chords
// <Chord chordname="C Major" frequencies="196.00, 261.63, 329.63" type="sine" />
import { h, Component } from 'preact';
import style from './style';
const audioContext = new (window.AudioContext || window.webkitAudioContext);
export default class Chord extends Component {
View custom-attributes-don-t-work.markdown
@deveedutta
deveedutta / gist:4656d539d14fa4a3a8971a0db7776b40
Created Oct 8, 2020
Clock Format: Ubuntu | change-edit-panel-digital-clock-format
View gist:4656d539d14fa4a3a8971a0db7776b40
What works for me:
%x, %r
Change the 'Clock Format' codes as supplied below:
%a, %B, %x, %r
View gist:bf079f78dff1d3d803ee2e883c2c5b3c
# RandR extension
xrandr --output VGA1 --off
xrandr --orientation normal
xrandr -o normal
xrandr --output LVDS --auto --rotate normal --pos 0x0 --output VGA --auto --rotate left --right-of LVDS 
xrandr | grep connected
xrandr --output eDP1 --brightness 0.95
xrandr --output eDP1 --brightness 0.5
xrandr --output eDP1 --brightness 0.25