Skip to content

Instantly share code, notes, and snippets.

View yogeshvar's full-sized avatar
🎯
Focusing

Yogi yogeshvar

🎯
Focusing
View GitHub Profile
@KrishnaPravin
KrishnaPravin / 2018-https-localhost.md
Created October 13, 2019 11:05 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

100 Days Of ML Code - Example Log

Use this as a base template. Create your own repository on GitHub and start logging your work daily!

Day 0: February 29, 2016 (Example 1)

(delete me or comment me out)

Today's Progress: Fixed CSS, worked on canvas functionality for the app.

Thoughts: I really struggled with CSS, but, overall, I feel like I am slowly getting better at it. Canvas is still new for me, but I managed to figure out some basic functionality.

@NickNaso
NickNaso / mongoose-middleware.js
Created August 8, 2017 20:13
Mongoose example of pre and post middlewares
'use strict'
const mongoose = require('mongoose')
mongoose.Promise = global.Promise
function wait(time) {
return new Promise((resolve) => {
setTimeout(resolve, time)
})
@fokusferit
fokusferit / enzyme_render_diffs.md
Last active April 23, 2025 17:13
Difference between Shallow, Mount and render of Enzyme

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render
@indiesquidge
indiesquidge / pull_request_template.md
Last active August 30, 2024 19:57
An example PR template
Status Type Env Vars Change Review App Ticket
Ready/Hold Feature/Bug/Tooling/Refactor/Hotfix Yes/No Link Link

⚠️ NOTE: use notes like this to emphasize something about the PR. This could include other PRs this PR is built on top of; new or removed environment variables; reasons for why the PR is on hold; or anything else you would like to draw attention to.

Problem

What problem are you trying to solve?

@clemlatz
clemlatz / self-signed-ssl-certificate.md
Last active January 3, 2025 23:24
Setup a self-signed SSL certificate with Nginx (server and browser)

1. Configure server: Nginx

Create the certificate:

$ sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt

Create a strong Diffie-Hellman group:

$ sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@jpalala
jpalala / how-to-setup-mac-elasticsearch.md
Created September 11, 2015 08:28
setting up elasticsearch on your mac with brew

Install va homebrew

If you don't have homebrew installed - get homebrew here

Then run: brew install elasticsearch

Configuration

Update the elasticsearch configuration file in /usr/local/etc/elasticsearch/elasticsearch.yml.

@deardooley
deardooley / 000-default.conf
Last active March 11, 2025 21:40
Sample Apache virtual host to proxy subdomain to docker container
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www
ServerName docker.example.com
ErrorLog logs/docker.example.com_error.log
CustomLog logs/docker.example.com_access.log combined
ProxyPreserveHost On
ProxyRequests off
<Location />
@vidakovic
vidakovic / gist:f3c04988aad928e9f3fd
Created February 3, 2015 21:57
Wakatime Git post-commit hook
#!/bin/bash
# NOTE: actually it would be nice to add something like the branch and SHA, but for the sake of demonstration I'm just using this file to feed Wakatime
# these variables are not used, but they might be useful; for someone else to play around
MESSAGE=$1
SHA=$(git rev-parse HEAD)
BRANCH=$(git symbolic-ref --short HEAD)
# give it a name