Skip to content

Instantly share code, notes, and snippets.

View paurakhsharma's full-sized avatar
💻
Hacking

Paurakh Sharma Humagain paurakhsharma

💻
Hacking
View GitHub Profile
@paurakhsharma
paurakhsharma / translate_arb.dart
Last active March 22, 2024 13:07
Auto translate all translation keys into supported target languages for arb file in Flutter app.
import 'dart:io';
import 'package:http/http.dart' as http;
import 'dart:convert';
const String googleTranslateUrl =
'https://translation.googleapis.com/language/translate/v2';
Future<String> translateText(
String text, String targetLanguage, String apiKey) async {
@paurakhsharma
paurakhsharma / Firebase cloud functions CORS image proxy.js
Last active April 19, 2022 15:14
Firebase cloud functions image proxy server. I use it to overcome Flutter CORS issues with the images. ie. CORS Proxy server
const cors = require('cors')({ origin: true });
const request = require('request');
functions.https.onRequest((req, res) {
cors(req, res, () => {
let url = req.query.url;
if (!url) {
url = req.body.url;
import 'package:flutter/material.dart';
void main() async {
runApp(const DynamicHeader());
}
class DynamicHeader extends StatelessWidget {
const DynamicHeader({Key? key}) : super(key: key);
@override
{
"general": {
"download": "डाउनलोड गर्नुहोस्"
},
"home": {
"resources": {
"index": {
"coaching": "कोचिंग",
"reports": "रिपोर्टहरू"
},
@paurakhsharma
paurakhsharma / object_diff.js
Last active June 18, 2020 03:15
Find the difference in a keys of two different objects
/**
* This script compares two different objects
* and finds a key value pair for keys that are missing in one object
* and keys that are extra in another
*/
let english_dict = {
home: {
button: "New button",
menu: "About"
@paurakhsharma
paurakhsharma / cassendra_docker.md
Last active June 30, 2019 12:50
Run cassendra easily in your docker environment.

Run cassendra using docker

First of all install docker and then follow the following steps:

  1. Create a network for cassendra docker network create some-network

  2. Pull and start cassendra server instance docker run --name some-cassandra --network some-network -d cassandra:latest

  3. Connect to cassendra from cqlsh