Skip to content

Instantly share code, notes, and snippets.

@pathtolearn
pathtolearn / conversion of string
Created October 3, 2018 10:12
conversion of string
function formatString(str) {
let strArray = str.split('_');
let formattedString = "";
for(i=0; i< strArray.length;i++) {
formattedString += makeFirstLetterUpperCase(strArray[i]);
}
}
function makeFirstLetterUpperCase(str) {
let str1 = str[0].toUpperCase() + str.slice(1,str.length);
@pathtolearn
pathtolearn / .htaccess
Created October 3, 2018 04:59
Apache Angular / React Deep Routing Snippet
RewriteEngine On
# Some hosts may require you to use the `RewriteBase` directive.
# If you need to use the `RewriteBase` directive, it should be the
# absolute physical path to the directory that contains this htaccess file.
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.html [QSA,L]
@pathtolearn
pathtolearn / Flutter
Last active October 31, 2018 22:45
Flutter
Awesome Flutter
https://github.com/Solido/awesome-flutter
Splash Screen:
https://medium.com/@vignesh_prakash/flutter-splash-screen-84fb0307ac55
Form:
https://codingwithjoe.com/building-forms-with-flutter/
Alert Dialog
@pathtolearn
pathtolearn / react native app
Created September 30, 2018 13:37
react native app run before start
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
@pathtolearn
pathtolearn / eclipse desktop shortcut
Created September 29, 2018 14:58
Eclipse desktop shortcut
[Desktop Entry]
Version=1.0
Name=Eclipse
Comment=Java IDE
Type=Application
Categories=Development;IDE;
Exec=/home/{username}/Programs/eclipse/eclipse
Terminal=false
StartupNotify=true
Icon=/home/{username}/Programs/eclipse/icon.xpm
@pathtolearn
pathtolearn / .htaccess
Created September 23, 2018 13:43 — forked from julianpoemp/.angular-htaccess.md
Optimal .htaccess configuration for an Angular 5 App in production
# place this file in the same folder as your index.html on your server
# make sure to set the right base href attribute in your index.html
# this file ist hosted on GithubGist:
# https://gist.github.com/julianpoemp/bcf277cb56d2420cc53ec630a04a3566
# REDIRECTION
# to index.html to make routing work in production
<IfModule mod_rewrite.c>
RewriteEngine on
@pathtolearn
pathtolearn / React Folder Structure
Created June 27, 2018 11:44
React Folder Structure
https://hackernoon.com/the-100-correct-way-to-structure-a-react-app-or-why-theres-no-such-thing-3ede534ef1ed
@pathtolearn
pathtolearn / React CRUD
Created June 23, 2018 12:31
React CRUD
https://codeburst.io/redux-a-crud-example-abb834d763c9
@pathtolearn
pathtolearn / ReactApp
Created June 22, 2018 09:01
Create React App With TypeScript
https://levelup.gitconnected.com/typescript-and-react-using-create-react-app-a-step-by-step-guide-to-setting-up-your-first-app-6deda70843a4
@pathtolearn
pathtolearn / DeterminingSupportfortheUFlag
Created May 18, 2018 13:59
Determining Support for the u Flag
function hasRegExpU() {
try {
var pattern = new RegExp(".", "u");
return true;
} catch (ex) {
return false;
}
}