Skip to content

Instantly share code, notes, and snippets.

View chathudan's full-sized avatar

Chathura Wijesinghe chathudan

View GitHub Profile
@chathudan
chathudan / GoogleTranslate.json
Created February 12, 2019 08:12
Translate JSON structures using google translation API.
#!/usr/bin/env node
const fs = require('fs');
const moment = require('moment');
const _ = require('lodash');
const path = require('path');
const agent = require('superagent-promise')(require('superagent'), Promise);
//Lang Codes https://ctrlq.org/code/19899-google-translate-languages
@chathudan
chathudan / GoogleTranslate.json
Created February 12, 2019 08:12
Translate JSON structures using google translation API. " node GoogleTranslate YOUR_GOOGLE_API_KEY JSON_FILE.json fr,et,nl"
#!/usr/bin/env node
const fs = require('fs');
const moment = require('moment');
const _ = require('lodash');
const path = require('path');
const agent = require('superagent-promise')(require('superagent'), Promise);
//Lang Codes https://ctrlq.org/code/19899-google-translate-languages

Delete workspace builds

  1. Go to your Jenkins home page → Manage Jenkins → Script Console
  2. Run the following script there. Change JOB_NAME to your project name
def jobName = "JOB_NAME"
def job = Jenkins.instance.getItem(jobName)
@chathudan
chathudan / GitCommands.md
Last active April 16, 2019 06:10
Useful Git Commands

Git Tag

  1. Checkout the tag (a Detached HEAD)

    git checkout tag/v1.1

  2. Create and Checkout a branch off that tag (i.e. Branching off the tag)

git checkout -b my-tagged-branch

@chathudan
chathudan / bright-v8-local.json
Created August 29, 2019 08:26 — forked from klokan/bright-v8-local.json
bright-v8-local.json
{
"version": 8,
"name": "Bright",
"sources": {
"mapbox": {
"url": "http://osm2vectortiles.tileserver.com/v1.json",
"type": "vector"
}
},
@chathudan
chathudan / MaterialDesignIconsFont.cs
Last active July 12, 2023 15:08
MAUI Rating View Control
namespace MauiControl.Rating;
internal class MaterialDesignIconsFont
{
public const string VectorSquare = "\U000f0001";
public const string AccessPointNetwork = "\U000f0002";
public const string AccessPoint = "\U000f0003";
public const string Account = "\U000f0004";
public const string AccountAlert = "\U000f0005";
public const string AccountBox = "\U000f0006";