Skip to content

Instantly share code, notes, and snippets.

View jdiss's full-sized avatar
:octocat:

Janaka Dissanayake jdiss

:octocat:
View GitHub Profile
@jdiss
jdiss / myscript.sh
Created March 2, 2021 11:17 — forked from bradtraversy/myscript.sh
Basic Shell Scripting
#! /bin/bash
# ECHO COMMAND
# echo Hello World!
# VARIABLES
# Uppercase by convention
# Letters, numbers, underscores
NAME="Bob"
# echo "My name is $NAME"
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var domStyle = document.createElement("style");
domStyle.append(
'* { color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }\
* * { background-color: rgba(0,255,0,.2) !important; }\
* * * { background-color: rgba(0,0,255,.2) !important; }\
* * * * { background-color: rgba(255,0,255,.2) !important; }\
* * * * * { background-color: rgba(0,255,255,.2) !important; }\
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var domStyle = document.createElement("style");
domStyle.append(
'* { color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }\
* * { background-color: rgba(0,255,0,.2) !important; }\
* * * { background-color: rgba(0,0,255,.2) !important; }\
* * * * { background-color: rgba(255,0,255,.2) !important; }\
* * * * * { background-color: rgba(0,255,255,.2) !important; }\
@jdiss
jdiss / multi-git-win.md
Last active February 18, 2020 11:30 — forked from rosswd/multi-git-win.md
Setting up a Github and Bitbucket account on the same computer on Mac OS. Now with a guide for Windows 10.

Setting up github and bitbucket on the same computer (Windows)

Guide for Windows

mix3d asked for some help using this guide with windows so here we go. This was tested with Windows 10. Run all commands in Git Bash once it's installed.

Github will be the main account and bitbucket the secondary.

Git for Windows

  • Download and install Git for Windows
    • In the installer, select everything but decide if you want a desktop icon (2nd step)
import styled from "@emotion/styled";
const DragContainer = styled.div`
height: 460px;
max-height: 80vh;
width: 100%;
position: relative;
overflow: hidden;
`;
@jdiss
jdiss / readme-template.md
Created November 5, 2019 12:46 — forked from martensonbj/readme-template.md
Personal project README template

Project Name & Pitch

Example:

TweetWorld

An application used to filter data form Twitter based on user preference, built with React, Redux, JavaScript, and CSS.

Project Status

(only necessary if incomplete)

@jdiss
jdiss / media-query.css
Created February 11, 2019 00:19 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@jdiss
jdiss / es7AsyncAwaitParallel.js
Created January 30, 2019 05:12 — forked from johntran/es7AsyncAwaitParallel.js
ES7 multiple async/await functions in parallel execution.
//old: productReviews.js - lines 121 - 125
async function productReviewsByProductAllGet(request, response) {
try {
const { productId } = request.params;
// get all reviews for a product id
const reviews = await productReviewsQuery.selectAllByProductId(productId);
const result = [];
// Loop from beginning of reviews array to reviews
for(let i = 0; i < reviews.length; i++) {
@jdiss
jdiss / code.ext
Created January 7, 2019 12:56 — forked from divyanshu013/code.ext
My VSCode extensions
code --install-extension EditorConfig.EditorConfig
code --install-extension Perkovec.emoji
code --install-extension SintrumIT.theme-oceanic-next-italic
code --install-extension agauniyal.vscode-caniuse
code --install-extension alefragnani.project-manager
code --install-extension andys8.jest-snippets
code --install-extension arcticicestudio.nord-visual-studio-code
code --install-extension be5invis.vscode-custom-css
code --install-extension bierner.markdown-emoji
code --install-extension bungcip.better-toml
@jdiss
jdiss / code.settings
Created January 7, 2019 12:56 — forked from divyanshu013/code.settings
My VSCode settings
{
"vscode_custom_css.imports": ["file:///home/div/.vscode/styles.css"],
"window.zoomLevel": 1,
"editor.fontFamily": "'Fira Code', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
"javascript.validate.enable": false,
"editor.fontLigatures": true,
"editor.minimap.enabled": false,
"editor.multiCursorModifier": "ctrlCmd",
"workbench.startupEditor": "newUntitledFile",
"editor.lineHeight": 22, // or 24