Skip to content

Instantly share code, notes, and snippets.

View aryaminus's full-sized avatar
🦋

sunim aryaminus

🦋
View GitHub Profile
@aryaminus
aryaminus / schema.prisma
Last active September 21, 2021 03:59
Basic Setup Configuration
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
@aryaminus
aryaminus / TextEditor.tsx
Created October 5, 2020 04:07 — forked from rhostem/TextEditor.tsx
[React typescript] Text editor with draft.js (can export contents in HTML)
import * as React from 'react'
import { withStyles, WithStyles, StyleRules } from 'material-ui/styles'
import { Editor } from 'react-draft-wysiwyg'
import { EditorState, ContentState, convertToRaw } from 'draft-js'
import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css'
import draftToHtml from 'draftjs-to-html'
import htmlToDraft from 'html-to-draftjs'
import { debounce } from 'throttle-debounce'
import React from "react";
import { Location } from "@reach/router";
let scrollPositions = {};
class ManageScrollImpl extends React.Component {
componentDidMount() {
try {
// session storage will throw for a few reasons
// - user settings
@aryaminus
aryaminus / init.vim
Created November 11, 2019 18:06 — forked from benawad/init.vim
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@aryaminus
aryaminus / default nginx configuration file
Created April 28, 2019 02:27 — forked from skbr1234/default nginx configuration file
The default nginx configuration file inside /etc/nginx/sites-available/default
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
@aryaminus
aryaminus / index.js
Created September 25, 2018 16:32 — forked from AlexBrasileiro/index.js
ShareYourFeedback
// inspiration: https://dribbble.com/shots/4370657-Share-Your-Feedback
import React, { Component, Fragment } from "react";
import { Animated, StyleSheet, Text, View, TouchableOpacity, Dimensions, Platform, Easing, TextInput, KeyboardAvoidingView, Image } from "react-native";
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
const { width: windowWidth } = Dimensions.get('window');
const Icon = (props) => <FontAwesome5 {...props} />
@aryaminus
aryaminus / rn-sketch-canvas.js
Last active August 28, 2018 03:06
sketch_hub store from async
import React, { Component } from "react";
import {
StyleSheet,
Text,
View,
Alert,
TouchableOpacity,
Platform,
AsyncStorage
} from "react-native";
#!/usr/bin/env bash
#
# Dropbox Uploader
#
# Copyright (C) 2010-2017 Sunim Acharya <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#!/usr/bin/env bash
#
# Dropbox Uploader
#
# Copyright (C) 2010-2017 Andrea Fabrizi <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.