Skip to content

Instantly share code, notes, and snippets.

@Landish
Landish / 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"]
@Landish
Landish / user-settings.md
Last active November 18, 2017 11:50
VSCode User Settings
{
  "workbench.statusBar.visible": false,
  "workbench.startupEditor": "none",
  "workbench.iconTheme": "material-icon-theme",
  "workbench.colorTheme": "Atom One Dark",
  "editor.fontFamily": "'Fira Code', Menlo, Monaco, 'Courier New', monospace",
  "editor.fontSize": 14,
  "editor.fontLigatures": true,
 "editor.formatOnSave": true,
@Landish
Landish / router.md
Created November 16, 2017 17:36
Reload Current Page With React Router 4
componentWillReceiveProps(nextProps) {
  const currLocationKey = this.props.location.key;
  const nextLocationKey = nextProps.location.key;
  if (currLocationKey !== nextLocationKey) {
    // do the magic here
  }
}
@Landish
Landish / prettier.md
Last active September 13, 2017 15:16
Default options for Prettier
@Landish
Landish / git.md
Last active September 4, 2017 05:51
GIT Tips & Tricks

Change Remote URL

$ git remote set-url origin <remote_repo>

Discard Unstaged/Untracked Changes

$ git checkout -- .
$ git reset --hard
@Landish
Landish / Disable Font Size Changing on Landscape Mode.css
Last active November 24, 2016 10:23
iPhone Web Application Development Tips
body {
-webkit-text-size-adjust: none;
}
@Landish
Landish / calendar.md
Last active May 28, 2016 14:24
Month names and week days in array translated in Georgian

Full Month Names

['იანვარი', 'თებერვალი', 'მარტი', 'აპრილი', 'მაისი', 'ივნისი', 'ივლისი', 'აგვისტო', 'სექტემბერი', 'ოქტომბერი', 'ნოემბერი', 'დეკემბერი']

Short Month Names

['იან', 'თებ', 'მარ', 'აპრ', 'მაი', 'ივნ', 'ივლ', 'აგვ', 'სექ', 'ოქტ', 'ნოე', 'დეკ']
@Landish
Landish / node.md
Created April 2, 2016 11:45
Node/NPM Tips & Tricks

Faster NPM

Execute the following command, before running npm install:

$ npm set progress=false
@Landish
Landish / KeyCodes.md
Created November 19, 2015 13:46
KeyCodes
var keyCode = {
    /**
     * keypress event key-codes
     */
    'keyPress': {
        'GraveAccent': 96, // `
        'One': 49, // 1
 'Two': 50, // 2
@Landish
Landish / How to use?
Last active December 26, 2015 01:19
Laravel 4 Custom Facades
1) Copy the /MyNameSpace/ folder in your /app/libraries/ directory
2) Create below listed files in /app/libraries/MyNameSpace/ directory and write your code.
3) Add "app/libraries" to autoload classmap object in composer.json file
4) Run "composer dump-autoload" command with your CLI.
5) Add Route::get('test', function() { return Myclass::myMethod(); }); closure function to your app/routes.php file.
6) Visit to page http://laravel/index.php/test and see the code in action.