Skip to content

Instantly share code, notes, and snippets.

View deveedutta's full-sized avatar
🚫
Caution! Account suspended.

Deveedutta (Suspended) deveedutta

🚫
Caution! Account suspended.
View GitHub Profile
@deveedutta
deveedutta / prettyDateUnixEpochTime.js
Last active August 18, 2016 06:20
JavaScript Pretty Date for Unix Epoch Time originally by John Resig
/*
* 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 February 19, 2019 14:47
oscillator component
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 October 5, 2016 18:58
the main file of the app
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 October 6, 2016 22:25
Chord React component that plays a combination of 3 oscillators to generate a Chord
// 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 {
@deveedutta
deveedutta / custom-attributes-don-t-work.markdown
Last active December 21, 2016 06:46
custom attributes don't work
@deveedutta
deveedutta / gist:4656d539d14fa4a3a8971a0db7776b40
Created October 8, 2020 20:40
Clock Format: Ubuntu | change-edit-panel-digital-clock-format
What works for me:
%x, %r
Change the 'Clock Format' codes as supplied below:
%a, %B, %x, %r
# 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
@deveedutta
deveedutta / .bash_profile
Created November 16, 2022 12:51
Reference .bash_profile file
export PATH=/usr/local/bin:$PATH
export PATH=/usr/bin:$PATH
export PATH=/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin:$PATH
export PATH=/Applications/Sublime\ Text.app/Contents/SharedSupport/bin:$PATH
export PATH=/Users/deveedutta.m/mongodb/bin:$PATH
export PATH=/Users/deveedutta.m/redis/src:$PATH
export PATH=/Users/deveedutta.m/apache-tomcat-8.0.36/bin:$PATH
export PATH=/Users/deveedutta.m/apache-maven-3.3.9/bin:$PATH
export PATH=/usr/local/mysql/bin:$PATH
@deveedutta
deveedutta / SSL Certificate set up in Linux(Ubuntu).md
Created July 10, 2023 02:11
SSL Certificate set up in Linux(Ubuntu)

To set up an SSL certificate on Linux (Ubuntu), you can follow these general steps:

Obtain an SSL certificate:

  • You can either generate a self-signed certificate for testing purposes or purchase a certificate from a trusted certificate authority (CA).
  • If you choose to purchase a certificate, follow the CA's instructions for obtaining the certificate. Typically, you will need to provide them with a certificate signing request (CSR) generated on your server.

Install OpenSSL:

@deveedutta
deveedutta / ferris-wheel.html
Created December 16, 2023 20:29
ferris wheel drawn with svg
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Carnival SVG Animation</title>
<style>
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }