Skip to content

Instantly share code, notes, and snippets.

@bogas04
bogas04 / cssjs.html
Last active August 29, 2015 14:17
Intro to HTML CSS & JS ish
<!doctype html>
<html>
<head>
<title>Apna Codechef</title>
<meta charset="utf-8"/>
<link href="style.css" rel="stylesheet"/>
<style>
body {
background-color : grey;
color : white;
@bogas04
bogas04 / server.js
Created October 3, 2015 16:33
NodeJS Server with deflated response
// NOTE: Relies on ES6 syntax, works on Node 4.0.0 or higher
var zlib = require('zlib');
require('http')
.createServer((req, res) => {
res.writeHead(200, {
'Content-encoding': 'deflate',
'Content-length': zlib.deflateSync(body).length
});
res.write(zlib.deflateSync(body));
@bogas04
bogas04 / osxshortcuts.md
Last active November 16, 2022 15:29
Windows To OSX Migration Help (Shortcuts, Tips & Tricks)

OSX Shortcuts

  • command+left - jump to left most of text field. Use other arrows accordingly.
  • alt+left - skip words in text fields instead of characters. Use other arrows accordingly.
  • cmd+c - copy
  • cmd+v - paste
  • cmd+alt+c - move (followed by cmd+v for paste, like cut paste)
  • command+space - spotlight for searching files. (just like windows key)
  • delete - backspace (as known in windows)
  • fn+delete - delete (as known in windows)

#FASTENERS

  • What is fastening? Types of fastening? Use of each type?

    • A fastener is a hardware device that mechanically joins or affixes two or more objects together.
    • Temporary and Permanent. Permanent is used when it has to be joint permanently without any scope of disconnecting two components.
  • What are two basic types of threads? Where each type is used?

    • External and Internal. External on bolts , studs etc and internal on nuts , components etc.
  • Define the terms : fundamental triangles , truncation , depth of thread , pitch , lead , slope, flank , thread angle , crest ,root , and axis of thread.

@bogas04
bogas04 / react-component.md
Last active February 23, 2016 20:47
Bash function to create react-component folder

React component

A quick shell script function to create a directory following react-style-guide

# React component
rc () { 
mkdir $1;
touch "$1/index.js";
echo "import React, { Component } from 'react';
@bogas04
bogas04 / webpack.js
Created December 31, 2015 14:25 — forked from Couto/webpack.js
Fetch polyfill with webpack
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var path = require('path');
var folders = {
APP: path.resolve(__dirname, '../app'),
BUILD: path.resolve(__dirname, '../build'),
BOWER: path.resolve(__dirname, '../bower_components'),
NPM: path.resolve(__dirname, '../node_modules')
};
@bogas04
bogas04 / esnextbin.md
Created February 5, 2016 15:50
esnextbin sketch
@bogas04
bogas04 / AwesomeApp.jsx
Last active February 5, 2016 15:52
A sample React App using ES2015 and JSX for educational purposes. Test it here: http://esnextb.in/?gist=5e14d786f9453d074d35
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
const Header = ({ appName = 'Enter Application Name', links = [] }) => {
const styles = {
header: {
textAlign: 'center',
},
nav: {
@bogas04
bogas04 / esnextbin.md
Created February 17, 2016 07:54
esnextbin sketch
Devnaagri Gurulipi Punjabi Unicode
k
K
g
G
|
c
C
j