Skip to content

Instantly share code, notes, and snippets.

🏠
Building cssbattle.dev

Kushagra Gour chinchang

🏠
Building cssbattle.dev
Block or report user

Report or block chinchang

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@chinchang
chinchang / remote-first-tech-companies
Created Oct 1, 2019
List of good remote first companies in tech
View remote-first-tech-companies
- DuckDuckgo - https://duckduckgo.com/hiring/
- Gitlab - https://about.gitlab.com/jobs/
- Invision - https://www.invisionapp.com/about/#jobs
- Automattic - https://automattic.com/work-with-us/
- Doist - https://doist.com/jobs/
- Zapier - https://zapier.com/jobs/
- Gatsby - https://www.gatsbyjs.com/careers/
- Netlify - https://www.netlify.com/careers/
- Airbase - https://angel.co/company/airbase-1/jobs
- Hasura - https://hasura.io/careers
View c-exercises.md

Program 1

  • Take a sentence as input from user
  • Calculate and show: sentence's length, number of vowels.

Program 2

  • Take a number n between 5-20 as input from user
  • Create an array of length n
  • Put random number (1-100) in each element of the array
  • Display the array's element by comma separated. Eg. 1,56,2,88,2
  • Show the sum of the all the elements of the array
@chinchang
chinchang / endpoint.js
Created Feb 26, 2019
Now lambda issue
View endpoint.js
const PixelDiff = require('pixel-diff')
module.exports = async (req, res) => {
res.statusCode = 200
res.setHeader('Content-Type', `text/plain`)
res.setHeader('Cache-Control', 'no-cache')
res.end('done!')
}
@chinchang
chinchang / game.html
Last active Oct 29, 2018
A simple game for my talk at GDG devfest '18
View game.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<style id="webmakerstyle">
body {
padding: 0;
margin: 0;
@chinchang
chinchang / mac-setup
Last active Aug 26, 2019
Steps to setup my mac machine
View mac-setup
Steps to setup mac osx
- Finish onboarding
## System Tweaks
- increase key repeat rate (Preference > Keyboard)
- increase trackpad speed (Preferences > Trackpad)
- enable 3-finger drag (Preferences > Accessibility)
- Disable "swipe between pages" (Preferences > Tackpad > More gestures)
@chinchang
chinchang / atomic-vs-oocss.html
Created Mar 29, 2016
Comparing code for OOCSS and Atomic CSS
View atomic-vs-oocss.html
<!--
Example: A simple list component with each item as a block one below other with some padding and border.
-->
<!-- Atomic CSS -->
<ul class="MB(baseSpacing) Bgc(#0280ae)">
<li class="P(halfBaseSpacing) BdB(1px)"></li>
...
</ul>
@chinchang
chinchang / angular-with-o-o.js
Created Dec 13, 2015
Angular like watch and directive implementation concept using Object.observe
View angular-with-o-o.js
(function () {
function getObjectFromExpression(expr) {
var splits = expr.split('.'),
obj, propertyName;
if (splits.length === 1) {
obj = window;
propertyName = splits[0];
} else {
obj = splits.slice(0, splits.length - 1).reduce(function (obj, key) {
@chinchang
chinchang / xmlToJson.js
Last active Oct 11, 2019
Function to convert XML to JSON
View xmlToJson.js
/**
* Changes XML to JSON
* Modified version from here: http://davidwalsh.name/convert-xml-json
* @param {string} xml XML DOM tree
*/
function xmlToJson(xml) {
// Create the return object
var obj = {};
if (xml.nodeType == 1) {
@chinchang
chinchang / react-with-unknown-attributes.js
Last active Sep 15, 2016
Make ReactJS work with unknown attributes
View react-with-unknown-attributes.js
/**
*
* PATCH to make React work with custom attributes.
*
*/
HTMLDOMPropertyConfig.isCustomAttribute = function(attr) {
// Strip off custom attributes React puts for its working.
if ({children: 1}[attr]) { return false; }
// Take any attribute (with correct syntax) as custom attribute.
You can’t perform that action at this time.