Skip to content

Instantly share code, notes, and snippets.

View rajasegar's full-sized avatar

Rajasegar Chandran rajasegar

View GitHub Profile
<article class="fw-mx-16">
<div class="fw-card-1 fw-p-20 fw-flex fw-flex-column" style="width: 200px">
<section>
<div class="fw-flex fw-flex-row">
<p class="fw-flex-grow fw-type-h7 fw-mb-0">Booking ID</p>
<span class="fw-type-xs"><fw-icon name="arrow-right"></fw-icon></span>
</div>
<a href="#">
<span class="fw-type-h6 fw-color-azure-800">#1237483</span>
</a>
@rajasegar
rajasegar / Accordion.tsx
Created September 24, 2021 10:23
Accordion component in React and Typescript using details and summary
import React, { useState } from "react";
import styled from "styled-components";
import { Icons } from "../Icons";
const Content = styled.div`
padding: 1em;
`;
const Summary = styled.summary`
::marker {
@rajasegar
rajasegar / wallpaper.sh
Created September 26, 2020 07:08
Ubuntu wallpaper script
# Put this script in /usr/local/bin
# Add executable permissions with chmod +x wallpaper.sh
# Put it as a startup script
#!/bin/sh
wget -O /tmp/wallpaper.jpg https://source.unsplash.com/random/1920x1080
gsettings set org.gnome.desktop.background picture-uri file:////tmp/wallpaper.jpg
@rajasegar
rajasegar / wallpaper.sh
Created September 12, 2020 15:37
Unsplash wallpaper changer for xfce4-desktop
# set wallpaper from Unsplash on startup
#!/bin/bash
wget -O /tmp/wallpaper.jpg https://source.unsplash.com/random/1920x1080
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/workspace0/last-image -s /tmp/wallpaper.jpg
(setq exec-path (append exec-path '("/usr/local/bin")))
(add-to-list 'load-path "~/.emacs.d/site-lisp/emms/lisp")
(require 'emms-setup)
(emms-standard)
(emms-default-players)
(define-emms-simple-player mpg123 '(file url)
(regexp-opt '(".mp3"))
"mpg123" "*.mp3")
import Component from '@glimmerx/component';
export default class extends Component {
static template() {
return <h1> Hello world</h1>
}
}
@rajasegar
rajasegar / rename-qunit-module.js
Last active May 19, 2020 09:39
Rename qunit modules codemod
// Press ctrl+space for code completion
export default function transformer(file, api, options) {
const j = api.jscodeshift;
const root = j(file.source);
const body = root.get().value.program.body;
let filter = {
callee: {
name: "module",
}
@rajasegar
rajasegar / demo-package1.json
Created March 27, 2020 07:08
Snowpack - How it works?
{
"name": "snowpack-demo",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
@rajasegar
rajasegar / destination.js
Last active December 20, 2019 09:06
JARVIS codemod gist
bar.baz();