Skip to content

Instantly share code, notes, and snippets.

View geekysrm's full-sized avatar
👋
Hey, how are you?

Soumya Ranjan Mohanty geekysrm

👋
Hey, how are you?
View GitHub Profile
@geekysrm
geekysrm / gatsby-start.sh
Created January 24, 2020 08:47
tailwind+gatsby blogpost - 1
npx gatsby new your-gatsby-site
@geekysrm
geekysrm / Markdium-Diff.diff
Created January 24, 2020 08:59
Markdium-Hello Markdium!
public class Hello1
{
public static void Main()
{
- System.Console.WriteLine("Hello, World!");
+ System.Console.WriteLine("Rock all night long!");
}
}
@geekysrm
geekysrm / Markdium-TypeScript.ts
Created January 24, 2020 08:59
Markdium-Hello Markdium!
let foo = 'bar'
/**
Don't worry about the code block, it will be saved as a gist with right language format, and auto embed to your post.
**/
@geekysrm
geekysrm / gatsby-tailwind-2.sh
Created February 6, 2020 11:08
Install Tailwind and generate Tailwind config file
# Install Tailwind:
npm install tailwindcss --save-dev
# Generate Tailwind config:
npx tailwind init
@geekysrm
geekysrm / gatsby-tailwind-3.sh
Last active February 6, 2020 11:19
Now install Emotion packages and tailwind-micro:
npm i @emotion/core @emotion/styled tailwind.macro@next gatsby-plugin-postcss postcss-import postcss-preset-env
# We are installing the 'next' version of tailwind micro so as to use TailwindCSS 1.0.0+
# For older versions of TailwindCSS, just install 'tailwind.macro'
plugins: [
...
{
resolve: `gatsby-plugin-postcss`,
options: {
// Accepts all options defined by `gatsby-plugin-postcss` plugin.
},
},
{
resolve: `gatsby-plugin-emotion`,
@tailwind base;
@tailwind utilities;
// Edit the path to where you have kept the globals.css file
import "./src/styles/globals.css"
import React from "react";
import tw from "tailwind.macro";
const MyComponent = (
<h4 css={tw`font-semibold text-lg leading-snug truncate`}>This is Soumya</h4>
);
export default MyComponent;
import React from "react"
import tw from "tailwind.macro"
const MyComponent = tw.div`
bg-white
rounded-lg
overflow-hidden
border
`