Skip to content

Instantly share code, notes, and snippets.

View kcjpop's full-sized avatar
🕳️

An Cao kcjpop

🕳️
View GitHub Profile
@kcjpop
kcjpop / hi.md
Created September 1, 2022 07:05

Job Description

We are looking for a motivated and committed Software Developer (m/f/d) who is passionate about establishing value-added technologies of the future in today's industries.

At Danfoss we are offering you an opportunity to join a leading company in the field of heating, cooling and air conditioning. We develop and produce sustainable and quality solutions for people around the world and have a positive impact on global change. Do you want to actively participate in the digital transformation of the company and co-create solutions for digitalization in district heating systems?

As a constantly growing world-lead Engineering company, nurturing inclusive environment, embracing diversity and striving to create high-performing teams of talents, we are open to welcome a dedicated and resourceful colleague who is open to bring his/her whole self and join our collaborative team on the Engineering Tomorrow journey. 

You will join the core product development team for the Heat S

07-ghost. 7
07-ghost. 8
07-ghost. 1
07-ghost. 10
07-ghost. 11
07-ghost. 12
07-ghost. 13
07-ghost. 14
07-ghost. 15
https://www.codewars.com/kata/54ba84be607a92aa900000f1/javascript
https://www.codewars.com/kata/5a8d2bf60025e9163c0000bc/javascript
// Translates 'a' to '🇦', 'b' to '🇧' and so on.
function letterToLetterEmoji(letter) {
return String.fromCodePoint(letter.toLowerCase().charCodeAt() + 127365);
}
// Translates 'pl' to 'PL', 'en-US' to 'US' and so on.
function countryCodeToCountry(countryCode) {
return countryCode.split('-').pop().toUpperCase();
}
@kcjpop
kcjpop / gist:7eb20d4d35b36891c43622858a213782
Created March 24, 2021 07:53
Stuff to care about SQL
1. CASE WHEN. Shows up all the time.
2. Self joins. Common in product.
3. DISTINCT and GROUP BY
4. Left vs outer joins.
5. UNION. Rarely discussed but frequent.
6. SUM and COUNT
7. Date-time manipulation
8. String formatting, substring
9. Window functions like rank and row
10. Subqueries
{
"records": [
{
"fields": {
"date": "2020-01-09T11:40:00.356Z",
"signal": 1
}
},
{
"fields": {
@kcjpop
kcjpop / 5y.md
Last active October 19, 2019 07:01
55 Lessons From 5 Years in React

by Cory House

Getting familiar with a new project

  1. Review package.json first to understand deps, scripts, and config.
  2. Draw tree on the whiteboard, or use React dev tools. Helps to visualize state.

Dev workflow

  1. Quickly nav to component or func: CMD click in JSX (VSCode)
@kcjpop
kcjpop / alchemy.js
Last active September 16, 2019 11:08
// Demo: https://codesandbox.io/embed/nifty-monad-mdsz2
const elements = {
"1": {
id: "1",
name: "water",
description: "",
parents: [["148", "600"], ["144", "600"]],
children: [
"5",
"9",
// App.js
import * as Analytics from 'modules/analytics';
import * as Auth from 'modules/auth';
import * as Search from 'modules/search';
import * as Users from 'modules/users';

// HOC to check logged in user
function checkAuthentication(Component) {
@kcjpop
kcjpop / index.js
Created November 19, 2018 12:02
Count consecutive chunks of a number array
const assert = require('assert')
function f(n) {
const [result, counter, num] = (n + '').split('').map(Number)
.reduce(([result, count, num], n) => {
if (num == null) return [result, 1, n]
if (n !== num) return [
[...result, [count, num]],
1,