Skip to content

Instantly share code, notes, and snippets.

View hlthi's full-sized avatar

Muhammet Öztürk hlthi

  • Trabzon-Ankara,Turkey
View GitHub Profile
@dani-mp
dani-mp / ReactNavigation4+Context.js
Last active February 25, 2020 13:33
React Navigation (v1/2/3/4) Navigator wrapped in a React Context Provider
// So we have a context...
const Context = React.createContext();
class Provider extends React.Component {
addTodo = todo => this.setState(({ todos }) => ({ todos: [...todos, todo] }));
state = {
todos: [],
addTodo: this.addTodo
@rgrove
rgrove / parseJson.js
Created February 10, 2019 01:37
ECMA-404 compliant JSON parser in pure JS
/**
This is an ECMA-404 compliant JSON parser written in pure JS, with nice error
reporting. It's not super useful since it's ridiculously slow compared to
`JSON.parse()`, but I had fun writing it.
ISC License
Copyright (c) 2019 Ryan Grove <ryan@wonko.com>
Permission to use, copy, modify, and/or distribute this software for any purpose
import trLocale from 'moment/locale/tr';
import moment from 'moment';
moment.updateLocale('tr', trLocale);
//do whatever
@liorocks
liorocks / jsconfig.md
Last active May 25, 2023 13:47
jsconfig.json

jsconfig.json

{
  "compilerOptions": {
    "baseUrl": "./src",
    "target": "ES6",
    "jsx": "preserve",
    "allowSyntheticDefaultImports": true
  },
 "exclude": ["build", "node_modules"]
@Bjvanminnen
Bjvanminnen / instructions.md
Last active January 8, 2023 15:52
How to use glslify with create-react-app

Create your app

create-react-app my-app
cd my-app

Eject it, so that we can modify webpack config

npm run eject
y # when prompted
@bl4ck5un
bl4ck5un / responsive-semantic-ui.css
Created May 12, 2017 03:20
Responsive helpers (mobile-only etc.) for semantic-ui
/* Semantic UI has these classes, however they're only applicable to*/
/* grids, containers, rows and columns.*/
/* plus, there isn't any `mobile hidden`, `X hidden` class.*/
/* this snippet is using the same class names and same approach*/
/* plus a bit more but to all elements.*/
/* see https://github.com/Semantic-Org/Semantic-UI/issues/1114*/
/* Mobile */
@media only screen and (max-width: 767px) {
[class*="mobile hidden"],
@zeljic
zeljic / httpd-vhosts.conf
Created November 27, 2016 21:03
Windows Apache Virtual Host for Laravel 5.3
<VirtualHost *:80>
ServerAdmin admin@admin.com
DocumentRoot "__LARAVEL_PUBLIC_DIR__"
ServerName dev
ErrorLog "logs/dev-error.log"
CustomLog "logs/dev-access.log" common
<Directory "__LARAVEL_PUBLIC_DIR__">
Options Indexes FollowSymLinks
AllowOverride All
@nanoninja
nanoninja / jose_jwt_go_usage.md
Created September 29, 2016 14:35
JOSE - JWT Usage Examples

JOSE - JWT Usage Examples

JOSE is a comprehensive set of JWT, JWS, and JWE libraries.

jwt.io

Installation

go get github.com/SermoDigital/jose
@nkvenom
nkvenom / recursive-render.html
Last active August 5, 2022 08:15
React Example Render Recursive Function
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Recursive Component in React</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.11.0/umd/react.development.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.11.0/umd/react-dom.development.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js"></script>
</head>