Skip to content

Instantly share code, notes, and snippets.

View georgekrax's full-sized avatar
🖐️
Student

George Krachtopoulos georgekrax

🖐️
Student
View GitHub Profile
@georgekrax
georgekrax / typescriptreact.json
Last active November 13, 2020 21:06
VS Code Snippets for TypeScript React & Next.js
{
"TS React Dual Export": {
"prefix": "rfac",
"body": [
"import React from \"react\"",
"",
"export type Props = {",
"",
"}",
"",
@georgekrax
georgekrax / commit-emojis.md
Last active March 21, 2024 14:51
List of emojis for GitHub commit messages
Emoji Purpose MD Markup Prefix
📄 Generic message :page_facing_up:
📐 Improve the format / structure of the code / files :triangular_ruler: [IMPROVE]:
Improve performance :zap: [IMPROVE]:
🚀 Improve something (anything) :rocket: [IMPROVE]:
📝 Write docs :memo: [PROD]:
💡 New idea
@teeschorle
teeschorle / Readability.c
Last active October 22, 2022 18:32
CS50 Problem Set 2 (Fall 2019) - Readability
//CS50 Problem Set 2 (Fall 2019): Readability
//Author: teeschorle
#include <stdio.h>
#include <cs50.h>
#include <string.h>
#include <math.h>
int main(void)
{
{
// Place your snippets for typescriptreact here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"Typescript React PureComponent": {
"prefix": "rpc",
"body": [
"import * as React from 'react'",
@qutek
qutek / calculateStripeFee.js
Created February 3, 2018 06:20
[Calculate Stripe Fee] Calculate stripe fee to ask customer to cover stripe fee #javascript #stripe
/**
* Calculate stripe fee from amount
* so you can charge stripe fee to customers
* lafif <hello@lafif.me>
*/
var fees = {
USD: { Percent: 2.9, Fixed: 0.30 },
GBP: { Percent: 2.4, Fixed: 0.20 },
EUR: { Percent: 2.4, Fixed: 0.24 },
CAD: { Percent: 2.9, Fixed: 0.30 },
@premregmi
premregmi / px-to-rem.scss
Created February 1, 2018 07:07
PX TO REM FUNCTION in SASS - Convert px value to rem easily in SASS
// SASS FUNCTION TO CONVERT PX INTO REM
// Defining base font size
// The default font size for html is 16px
$base-size: 16;
//Function to convert px value into rem
//You can replace rem with any other value you want (rem is most preferred value for web)
@function size($target, $context: $base-size) {
@return ($target / $context) * 1em;
}