Skip to content

Instantly share code, notes, and snippets.

View waptik's full-sized avatar
💻
Learning JavaScript and ReactJS...

TheVirginBrokey waptik

💻
Learning JavaScript and ReactJS...
View GitHub Profile
@seven1m
seven1m / open_source_church_software.md
Last active August 1, 2025 11:15
List of Open Source Church Software (NO LONGER MAINTAINED)
@DavidWells
DavidWells / netlify.toml
Last active May 15, 2025 18:44
All Netlify.toml & yml values
[Settings]
ID = "Your_Site_ID"
# Settings in the [build] context are global and are applied to all contexts unless otherwise overridden by more specific contexts.
[build]
# This is the directory to change to before starting a build.
base = "project/"
# NOTE: This is where we will look for package.json/.nvmrc/etc, not root.
# This is the directory that you are publishing from (relative to root of your repo)
@nickscript0
nickscript0 / date-fns-migrate.js
Last active October 2, 2021 02:33
How to migrate from moment.js to date-fns (as the package is way smaller)
/**
* date-fns v2 is still in alpha, but has built-in Typescript support so best to use it:
* Docs: https://date-fns.org/v2.0.0-alpha.16/docs/Getting-Started
*
* npm install --save date-fns@next
*/
// Useful functions to import
import { formatDistanceStrict, isAfter, isBefore, format, subDays, isSameDay } from 'date-fns';
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active July 30, 2025 02:06
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).

@meSingh
meSingh / JsonMiddleware.php
Last active July 11, 2022 09:19
If you are using laravel as api only, you might want to return JSON on every request, even on errors/exceptions. The easiest way to do so is using this middleware globally.
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
class JsonMiddleware
{
public function handle(Request $request, Closure $next)
<?php
namespace App\Http\Requests;
use Illuminate\Http\Request;
class BaseRequest extends Request
{
public function expectsJson()
{
@9jaswag
9jaswag / index.js
Last active April 7, 2018 01:33
speech recogniton
window.SpeechRecognition = window.webkitSpeechRecognition || window.SpeechRecognition;
const synth = window.speechSynthesis;
const recognition = new SpeechRecognition();
const icon = document.querySelector('i.fa.fa-microphone')
let paragraph = document.createElement('p');
let container = document.querySelector('.text-box');
container.appendChild(paragraph);
const sound = document.querySelector('.sound');
@sam016
sam016 / index.html
Last active June 8, 2023 09:28
Alphabets letters created via SVG path // source http://jsbin.com/nacirij
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="SVG Alphabets">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>SVG Letters</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
<style id="jsbin-css">
@Pitasi
Pitasi / check_telegram_signature.js
Last active January 4, 2025 11:56
Telegram website login widget, signature check sample using Node.js
// Copied by https://gist.github.com/dotcypress/8fd12d6e886cd74bba8f1aa8dbd346aa,
// thanks for improving code style
const { createHash, createHmac } = require('crypto');
const TOKEN = "ABC:12345...";
// I prefer get the secret's hash once but check the gist linked
// on line 1 if you prefer passing the bot token as a param
const secret = createHash('sha256')
.update(TOKEN)
@JoaoCnh
JoaoCnh / map.js
Last active February 1, 2020 21:45
js map example
var allSongNames = songs.map(function (song) {
return song.name;
});
// ES6
const allSongNames = songs.map(song => {
return song.name;
});
console.log(allSongNames); // ["Curl of the Burl","Oblivion","Flying Whales","L'Enfant Sauvage"];