Skip to content

Instantly share code, notes, and snippets.

View akolybelnikov's full-sized avatar
:octocat:
Building the future, one line of code at a time. 🚀

reddree akolybelnikov

:octocat:
Building the future, one line of code at a time. 🚀
View GitHub Profile
@chrislopresto
chrislopresto / component.tsx
Created September 10, 2018 20:12
styled-components v4 + createGlobalStyle + TypeScript
import * as React from 'react';
import { theme } from './theme';
import { ThemeProvider, createGlobalStyle } from './styled-components';
const GlobalStyle = createGlobalStyle`
body {
font-family: Times New Roman;
}
`;
@johnzondr
johnzondr / webpack.server.config.js
Last active January 21, 2019 10:34
Webpack config for angular 6 SSR
// Work around for https://github.com/angular/angular-cli/issues/7200
const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: {
// This is our Express server for Dynamic universal
server: './server.ts',
// This is an example of Static prerendering (generative)
@PsKs
PsKs / github_gpg_key.md
Last active January 19, 2022 23:39 — forked from Fastidious/github_gpg_key.md
[Signing commits using GPG (Ubuntu/Mac)] To use on GitHub, or any other git repository.

Signing commits using GPG (Ubuntu/Mac)

  • Do you have an Github account? If not create one.
  • Install required tool.
  • Latest Git Client.
  • gpg tools.
# Ubuntu
sudo apt-get install gpa seahorse
@pavbsu
pavbsu / .bashrc
Last active June 3, 2020 11:00
Git Bash aliases for Windows
# create a file C:\Users\[user]\.bashrc
# add this content
# add your own aliases or changes these ones as you like
# to make a dot (.bashrs) file in windows, create a file ".bashrs." (without extention) and save. windows will save it as ".bashrc"
# run `source ~/.bashrc` in console
alias la='ls -A'
alias l='ls -CF'
alias gs='git status -bsu'
@dabit3
dabit3 / index.js
Created May 30, 2018 20:46
AWS AppSync with Next.js example with subscriptions
import gql from 'graphql-tag'
import { graphql, compose } from 'react-apollo'
import withData from '../withData'
import uuidV4 from 'uuid/v4'
const query = gql`
query listTodos {
listTodos {
items {
id
@westdavidr
westdavidr / go-install-wsl.sh
Created February 27, 2018 16:01
Script to install Go 1.10 on WSL
#!/bin/bash
set -e
GVERSION="1.10"
GFILE="go$GVERSION.linux-amd64.tar.gz"
GOPATH="$HOME/projects/go"
GOROOT="/usr/local/go"
if [ -d $GOROOT ]; then
echo "Installation directories already exist $GOROOT"
@jonurry
jonurry / 4-4 Eloquent Javascript Solutions.js
Last active March 22, 2022 20:31
4.4 Deep Comparison (Eloquent JavaScript Solutions)
function deepEqual(a, b) {
if (a === b) {
// items are identical
return true;
} else if (typeof a === 'object' && a !== null && typeof b === 'object' && b !== null) {
// items are objects - do a deep property value compare
// join keys from both objects together in one array
let keys = Object.keys(a).concat(Object.keys(b));
// filter out duplicate keys
keys = keys.filter(
@scriptex
scriptex / rename.js
Last active April 10, 2023 23:30
Rename all files in a folder with NodeJS
const { join } = require('path');
const { readdirSync, renameSync } = require('fs');
const [dir, search, replace] = process.argv.slice(2);
const match = RegExp(search, 'g');
const files = readdirSync(dir);
files
.filter(file => file.match(match))
.forEach(file => {
const filePath = join(dir, file);
@troyfontaine
troyfontaine / 1-setup.md
Last active June 25, 2025 12:13
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@aldo-roman
aldo-roman / compress.js
Last active November 11, 2021 13:48
Brotli compression with Angular CLI
const brotli = require('brotli')
const fs = require('fs')
const brotliSettings = {
extension: 'br',
skipLarger: true,
mode: 1, // 0 = generic, 1 = text, 2 = font (WOFF2)
quality: 10, // 0 - 11,
lgwin: 12 // default
}