Skip to content

Instantly share code, notes, and snippets.

View apsrcreatix's full-sized avatar
🇮🇳
loading...

Aditya Pratap Singh Rajput apsrcreatix

🇮🇳
loading...
View GitHub Profile
@apsrcreatix
apsrcreatix / generateLokaliseHelperData.ts
Created December 24, 2024 10:05
Lokalise - Helper/Code generator for react-intl based implementation
// path to english or your primary language file so it can generate helper code for you
import en from "./en.json";
// matches takes string input which try to find if that word exist in keys of the lokalise exported json you provided
function generateLokaliseHelperData(matches: string) {
try {
const translation = JSON.parse(JSON.stringify(en))
let results: any = "{"
let match = matches
for (const [key, value] of Object.entries(translation)) {
@apsrcreatix
apsrcreatix / Fix-vs-code-watch.md
Last active April 3, 2019 19:29
Visual Studio Code is unable to watch for file changes in this large workspace" (error ENOSPC)

For Ubuntu users

  • Run this in terminal: sudo gedit /etc/sysctl.conf

  • Scroll to the bottom and paste: fs.inotify.max_user_watches=524288

  • Save and clode the editor, then run this: sudo sysctl -p