Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Living in Present Landia...

Esen Sagynov kadishmal

💭
Living in Present Landia...
  • Amazon
  • Vancouver, Canada
View GitHub Profile
@kadishmal
kadishmal / match-bg-with-video-bg-color.tsx
Created Feb 3, 2021
Match page background with the background color of the video
View match-bg-with-video-bg-color.tsx
/* External dependencies */
import React from 'react';
import { Col, Row, Text } from 'atomize';
/* Local dependencies */
import './under-construction.scss';
import videoSrc from '../../assets/video/under-construction.mp4';
export default class UnderConstruction extends React.PureComponent {
video: React.RefObject<HTMLVideoElement>;
@kadishmal
kadishmal / gist:e03efafdd3996f5e6394
Created Aug 28, 2014
fd_count.sh: Watch open file descriptors count for a process.
View gist:e03efafdd3996f5e6394
#!/bin/sh
# Usage: sh fd_count.sh PID
RE='^[0-9]+$'
while :; do
clear;
for pid in `ps aux | awk '{print $2}'`; do
if [[ $pid =~ $RE ]] ; then
@kadishmal
kadishmal / delete_merged_git_branches.sh
Created May 14, 2014
A Bash script to delete already merged remote and local Git branches
View delete_merged_git_branches.sh
#!/bin/bash
# Usage:
# chmod +x delete_merged_git_branches.sh
# ./delete_merged_git_branches.sh /path/to/git/repo
DIR="$1"
if [ -z "$DIR" ]; then
echo "Error: Git directory path should be provided."
echo "Usage:"
@kadishmal
kadishmal / app.js
Created Oct 11, 2012
Simple Node.js server which responds in chunked transfer encoding
View app.js
var http = require('http');
http.createServer(function (request, response) {
response.setHeader('Content-Type', 'text/html; charset=UTF-8');
response.setHeader('Transfer-Encoding', 'chunked');
var html =
'<!DOCTYPE html>' +
'<html lang="en">' +
'<head>' +