Skip to content

Instantly share code, notes, and snippets.

View Narven's full-sized avatar
👾
Walking to the fridge...

P Ξ D R O L U Z Narven

👾
Walking to the fridge...
View GitHub Profile
@Narven
Narven / custom-props.tsx
Created June 9, 2020 15:36 — forked from iamtmrobinson/custom-props.tsx
Using custom props with a Redux form in Typescript
import * as React from 'react';
import {
Field as FormField,
InjectedFormProps,
reduxForm,
} from 'redux-form';
interface CustomProps {
customText: string;
}
@Narven
Narven / react-confirm.js
Created December 22, 2019 13:22 — forked from primaryobjects/react-confirm.js
A simple example of a confirm alert dialog in ReactJs / React.
<div className='delete-button' onClick={() => { if (window.confirm('Are you sure you wish to delete this item?')) this.onCancel(item) } } />
@Narven
Narven / get_dates.php
Created November 9, 2019 23:50 — forked from Jayaramki/get_dates.php
Get All Dates in given month and year in php
/*Get All Dates in given month and year in php by CJ Ramki (http://cj-ramki.blogspot.in)*/
function get_dates($month,$year){
$numbers = array('1','2','3','4','5','6','7','8','9');
$datesArray = array();
$num_of_days = date('t',mktime (0,0,0,$month,1,$year));
for( $i=1; $i<= $num_of_days; $i++) {
if(in_array($i,$numbers)) $i = '0'.$i;
//complete date in Y-m-d format
@Narven
Narven / gist:20ea71ee9d0c40c72c7b428a4b6a3bbb
Created October 1, 2019 22:46 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@Narven
Narven / makefile
Created September 26, 2019 00:46 — forked from sohlich/makefile
# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
BINARY_NAME=mybinary
BINARY_UNIX=$(BINARY_NAME)_unix
@Narven
Narven / gen_http_key.sh
Last active September 18, 2019 14:37
Generate CRT, KEY, PEM for localhost domains (HTTPS)
openssl req -x509 -nodes -new -sha256 -days 1024 -newkey rsa:2048 -keyout localhost.key -out localhost.pem -subj "/C=US/CN=Example-Root-CA"
openssl x509 -outform pem -in localhost.pem -out localhost.crt
@Narven
Narven / Vagrantfile
Created September 13, 2019 22:35 — forked from roblayton/Vagrantfile
A Vagrant multi-machine cluster using a loop
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
cluster = {
"master" => { :ip => "192.168.33.10", :cpus => 1, :mem => 1024 },
"slave" => { :ip => "192.168.33.11", :cpus => 1, :mem => 1024 }
}
@Narven
Narven / fixssh.sh
Created September 12, 2019 11:36
Fixs all permissions for .ssh folder and its content
sudo chmod 700 ~/.ssh
sudo chmod 644 ~/.ssh/*.pub
sudo chmod 600 ~/.ssh/id_rsa
@Narven
Narven / go-os-arch.md
Created August 22, 2019 09:52 — forked from asukakenji/0-go-os-arch.md
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.8.3 darwin/amd64.

A list of valid GOOS values

(Bold = supported by go out of the box, ie. without the help of a C compiler, etc.)

  • android
  • darwin
@Narven
Narven / cloudSettings
Last active January 19, 2023 20:26
vscode
{"lastUpload":"2023-01-19T20:26:33.928Z","extensionVersion":"v3.4.3"}