Skip to content

Instantly share code, notes, and snippets.

View nurrony's full-sized avatar

Nur Rony nurrony

View GitHub Profile
@nurrony
nurrony / main.dart
Created April 12, 2020 07:34 — forked from felangel/main.dart
Bloc with SearchDelegate
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:bloc/bloc.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@nurrony
nurrony / git-maven-howto.md
Last active October 14, 2021 14:32 — forked from fernandezpablo85/git-maven-howto.md
how to create your own maven repository on github

How to create a maven repository for your github project step by step

Clone your project in a separate folder

(note: replace ORGANIZATION and PROJECT)

git clone git clone [email protected]:ORGANIZATION/PROJECT.git my-repository
cd my-repository
git branch repository
@nurrony
nurrony / .zshrc
Created March 7, 2020 07:09
Run Studio 3T 2019.6.0 on Mac without a license
studio3t() {
nohup java -XstartOnFirstThread -cp /Applications/Studio\ 3T.app/Contents/Resources/app/data-man-mongodb-ent-2019.6.0.jar t3.dataman.mongodb.app.ad >/dev/null 2>&1 &
disown
}
@nurrony
nurrony / Makefile
Created January 21, 2020 18:00 — forked from mpneuried/Makefile
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@nurrony
nurrony / create_scala_app
Last active November 1, 2019 15:48
Scaffold Scala App in single command with optimal settings
#!/usr/bin/env zsh
vared -p 'Project Name?: [hello-world] ' -c NMR_SCALA_PROJECT_NAME
vared -p 'Organization version?: [info.nmrony] ' -c NMR_SCALA_PROJECT_ORG
vared -p 'Project version?: [v1.0.0-SNAPSHOT] ' -c NMR_SCALA_PROJECT_VERSION
vared -p 'Scala version?: [2.13.1] ' -c NMR_SCALA_PROJECT_SCALA_VERSION
NMR_SCALA_PROJECT_NAME=${NMR_SCALA_PROJECT_NAME:-hello-world}
NMR_SCALA_PROJECT_ORG=${NMR_SCALA_PROJECT_ORG:-info.nmrony}
NMR_SCALA_PROJECT_VERSION=${NMR_SCALA_PROJECT_VERSION:-v1.0.0-SNAPSHOT}
NMR_SCALA_PROJECT_SCALA_VERSION=${NMR_SCALA_PROJECT_SCALA_VERSION:-2.13.1}
if [ -d "$NMR_SCALA_PROJECT_NAME" ] ; then
@nurrony
nurrony / README.md
Created July 6, 2019 05:42 — forked from crypticmind/README.md
Setup lambda + API Gateway using localstack
@nurrony
nurrony / clean-up-boot-partition-ubuntu.md
Created May 8, 2019 05:04 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@nurrony
nurrony / git-recover-branch.md
Created May 4, 2019 14:26 — forked from jbgo/git-recover-branch.md
How to recover a git branch you accidentally deleted

UPDATE: A better way! (August 2015)

As pointed out by @johntyree in the comments, using git reflog is easier and more reliable. Thanks for the suggestion!

 $ git reflog
1ed7510 HEAD@{1}: checkout: moving from develop to 1ed7510
3970d09 HEAD@{2}: checkout: moving from b-fix-build to develop
1ed7510 HEAD@{3}: commit: got everything working the way I want
70b3696 HEAD@{4}: commit: upgrade rails, do some refactoring
@nurrony
nurrony / flutter_input_password_toggle.dart
Last active April 2, 2019 04:49 — forked from slightfoot/input_password_toggle.dart
Input Password Toggle and Form Validation, Above Keyboard Widget, Form Focus, Progress Button, State Separation - 27th March 2019 #HumpDayQandA
import 'package:flutter/foundation.dart' show ValueListenable; // should be exported by widgets
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
void main() {
runApp(Provider<LoginApi>(
value: LoginApiImpl(),
child: TestApp(),
));
}
@nurrony
nurrony / NavigationPrompt.jsx
Created January 23, 2019 08:34 — forked from bummzack/NavigationPrompt.jsx
A replacement component for the react-router `Prompt`.
import React from 'react';
import {withRouter} from 'react-router-dom';
import PropTypes from 'prop-types';
/**
* A replacement component for the react-router `Prompt`.
* Allows for more flexible dialogs.
*
* @example
* <NavigationPrompt when={this.props.isDirty}>