Skip to content

Instantly share code, notes, and snippets.

View choyan's full-sized avatar
🎯
Focusing

Zahidul Hossain choyan

🎯
Focusing
View GitHub Profile
@jaydenseric
jaydenseric / RouteIndicator.js
Last active November 29, 2023 11:34
A route change indicator for Next.js using React hooks.
import classNameProp from 'class-name-prop';
import { useRouter } from 'next/router';
import React from 'react';
import styles from './RouteIndicator.module.css';
const DONE_DURATION = 250;
export default function RouteIndicator() {
const router = useRouter();
@jimschubert
jimschubert / mime.csv
Created March 17, 2017 20:26
List of more common mime types from MDN, in CSV and TSV
Name MIMEType Extension Description
aac audio/aac .aac AAC audio file
abw application/x-abiword .abw AbiWord document
arc application/octet-stream .arc Archive document (multiple files embedded)
avi video/x-msvideo .avi AVI: Audio Video Interleave
azw application/vnd.amazon.ebook .azw Amazon Kindle eBook format
bin application/octet-stream .bin Any kind of binary data
bz application/x-bzip .bz BZip archive
bz2 application/x-bzip2 .bz2 BZip2 archive
csh application/x-csh .csh C-Shell script
@tristanisfeld
tristanisfeld / browsersync.js
Last active November 10, 2023 23:58
Gulp 4 - Multifile tasks w/ external config. Basic gulpfile template for use with multiple task files, using gulp-load-plugins
// =========================================================
// Gulp Task: browsersync
// NOTE: Using gulp v4
// Description: Sync sass, typescript, html, and browser
// using external config or add modify src
// npm install --save-dev browser-sync gulp-typescript gulpjs/gulp.git#4.0 gulp-load-plugins
// Options: node-sass gulp-sass || gulp-ruby-sass
// =========================================================
var config = require('../config.js');
var browserSync = require('browser-sync').create();
@mkalygin
mkalygin / install-zsh.sh
Created May 2, 2014 16:20
Install zsh on Elementary OS.
# Source: http://choyan.me/oh-my-zsh-elementaryos/
sudo apt-get update && sudo apt-get install -y curl vim git zsh
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | bash
sudo chsh -s $(which zsh) $(whoami)
@davidgomes
davidgomes / How to change Pantheon Terminal's color scheme.md
Created March 14, 2013 16:53
How to change Pantheon Terminal's color scheme

How to change Pantheon Terminal's color scheme

Many of us spend many hours of our days using their terminal. Plus, we all have different tastes when it comes to color schemes. That's why the ability to change the color scheme of a terminal is one of its more important featuresl. Throughout this tutorial, I'll teach you how you can change the looks of your terminal, step by step.

This tutorial is aimed at elementary OS users, but it also works for any Ubuntu user. Start by installing dconf-tools:

sudo apt-get install dconf-tools

Secondly, you need to decide which theme you're going to apply. You can find dozens of terminal color schemes online, you can even design your own using this web application. Design the color scheme, hit "Get Scheme" and choose "Terminator". You'll get a raw text file with a background color, a foreground color and a palette. Those strings define your color scheme. In this tutorial, I'll post an

@avinmathew
avinmathew / index.jsx
Created August 8, 2017 11:54
Multiple layouts with React Router v4
import React from "react"
import { Route, Switch } from "react-router-dom"
const AppRoute = ({ component: Component, layout: Layout, ...rest }) => (
<Route {...rest} render={props => (
<Layout>
<Component {...props} />
</Layout>
)} />
)
#elC - The elementary OS Combobulator - There are many issues within the community that tend to come up a lot.
#I know many of them are open bug reports, but until they are patched we can provide a consolidated list of work-arounds.
#I think this will be helpful for newcomers and veterans alike
#enable ppas
sudo apt install -y software-properties-common python3-software-properties python-software-properties
#install elementary tweaks
sudo add-apt-repository -y ppa:philip.scott/elementary-tweaks
sudo apt update -y
@jserrao
jserrao / url-segment.js
Created July 27, 2016 14:41
Get Last Segment of a URL in Javascript
var pageURL = window.location.href;
var lastURLSegment = pageURL.substr(pageURL.lastIndexOf('/') + 1);
console.log(lastURLSegment);
@meSingh
meSingh / sublime-text-installation-instructions.md
Last active June 7, 2020 16:20
Sublime Text Installation Instructions for Ubuntu 13.04 and Elementary OS Luna

Sublime Text 2 Installation Guide: Ubuntu 13.04 and Elementary OS Luna

1. Install Sublime Text 2

Open terminal

sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text

2. Install Sublime Package Control