Skip to content

Instantly share code, notes, and snippets.

View chandanrjit's full-sized avatar
🕶️
At work

Chandan Kumar chandanrjit

🕶️
At work
View GitHub Profile
@chandanrjit
chandanrjit / README.md
Created October 3, 2024 05:32 — forked from roachhd/README.md
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥✨💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄

node {
// Check the input build no exits or not
stage('Check the Valid Build Number') { // for display purposes
def jenkins = Jenkins.getInstance()
def jobName = "Demo"
def job = jenkins.getItem(jobName)
def BuildNo = "${BUILD_NUMBER}"
println "Last successfull build: ${job.getLastSuccessfulBuild()}"
def allbuild = "${job.getBuilds().collect{ it.getNumber()}}"
@chandanrjit
chandanrjit / reduce-sum-example
Created December 2, 2018 11:39
Array helper -reduce
// Can implemented all helper using reduce
let number = [10, 20, 30]
let sum = 0;
for (let i = 0; i < number.length; i++) {
sum += number[i];
}
console.log(sum)
@chandanrjit
chandanrjit / reduce
Created December 2, 2018 08:52
Array helper-reduce
//get email id
let users = [{
userID: "1",
userEmail: "user1@email.com"
},
{
userID: "2",
userEmail: "user2@email.com"
},
{
@chandanrjit
chandanrjit / every
Created December 2, 2018 07:47
Array helper-every
// lenght check of each element and return true if all of them satisfy the conditions
let items = ['001', '00002', '0000003', '002']
let validatelength = false
console.log('---for loop')
for (let i = 0; i < items.length; i++) {
validatelength = items[i].length > 2
}
console.log(validatelength, 'for loop')
@chandanrjit
chandanrjit / some
Last active December 2, 2018 07:39
Array helper -Some
// lenght check of each element and return true if any one of them satisfy the conditions
let items = ['001', '00002', '0000003', '002']
let validatelength = false
console.log('---for loop')
for (let i = 0; i < items.length; i++) {
if (items[i].length > 4)
validatelength = true
}
console.log(validatelength, 'for loop')
@chandanrjit
chandanrjit / find
Created December 2, 2018 06:55
Array find helper method
let carsNo = ['001', '002', '003', '004']
let myCarNo;
console.log('--for loop')
for (let i = 0; i < carsNo.length; i++) {
if (carsNo[i] === "002") {
myCarNo = carsNo[i]
}
}
@chandanrjit
chandanrjit / filter
Created December 1, 2018 14:25
ES filter usage
// data
//for & if
//filter should return
let direction = ["South", "North", "East", "West", "NorthWest", "NorthEast", "SouthWest", "SouthEast"]
let filteredDirection = []
//
for (let i = 0; i < direction.length; i++) {
if (direction[i].match("West")) {
filteredDirection.push(direction[i])
@chandanrjit
chandanrjit / map
Created December 1, 2018 07:31
map vs for loop with array
let cardNo = ['001', '002', '003']
// for loop and push each value to final array
let getFormattedCard = []
for (let i = 0; i < cardNo.length; i++) {
getFormattedCard.push(`Visa-${cardNo[i]}`);
}
console.log(getFormattedCard, 'for-loop-with-push')
// map with anonymous function
@chandanrjit
chandanrjit / forEach
Last active December 1, 2018 07:35
forEach vs for loop
let arrayforeach = [1, 2, 3]
console.log('--Loop using for loop--')
for (let i = 0; i < arrayforeach.length; i++) {
console.log(arrayforeach[i] * 2)
}
console.log('--Loop using forEach with anonymous function--')
arrayforeach.forEach(function (el) {