Skip to content

Instantly share code, notes, and snippets.

@bszwej
bszwej / echo.js
Last active April 16, 2024 14:31
Pure Node.js echo server, that logs all incoming http requests (method, path, headers, body).
const http = require('http');
const server = http.createServer();
server.on('request', (request, response) => {
let body = [];
request.on('data', (chunk) => {
body.push(chunk);
}).on('end', () => {
body = Buffer.concat(body).toString();
@canxerian
canxerian / how_to_icons_with_textmeshpro.txt
Last active April 16, 2024 14:29
How to use glyph icons with TextMeshPro
This guide shows how you can you use icon fonts in TextMeshPro
1. Copy the font file (.ttf) and copy it a location inside your Unity assets folder. I found my font file here: ‪C:\Windows\Fonts\SegoeIcons.ttf
2. In Unity, navigate to:
Window > TextMeshPro > Font Asset Creator
Select the font file you just copied to your project in "Source Font File"
3. Find the Unicode representation of your icon, these can be found on this website, for example: https://docs.microsoft.com/en-us/windows/apps/design/style/segoe-ui-symbol-font
Enter this Unicode to in to the text area labelled "Character Sequence (Hex).
@Andrusha-Ostapovich
Andrusha-Ostapovich / Creating Bots for Facebook Messenger, WhatsApp and Telegram.md
Last active April 16, 2024 14:29
Створення Бота для Фейсбук Месенджера, Ватсапа та Телеграму / Creating Bots for Facebook Messenger, WhatsApp and Telegram

English:

Creating a bot for Facebook Messenger

  1. Create a New Facebook Account or Log In: Facebook
  2. Create a Page for the Bot:
    • Click the menu button Menu
    • Click "Create Page" Create Page
    • Fill in the name and category Name and Category and click "Create Page".
  3. Register as a Developer: Facebook Developers Register
@notwa
notwa / halfband.c
Last active April 16, 2024 14:27
polyphase halfband filter generator
// C port of http://ldesoras.free.fr/prod.html#src_hiir
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <errno.h>
const double PI = 3.1415926535897932384626433832795;
void
compute_transition_param(double *kp, double *qp, double transition)
@sindresorhus
sindresorhus / esm-package.md
Last active April 16, 2024 14:26
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@just-jeb
just-jeb / embed-gist-dark-theme.css
Last active April 16, 2024 14:25
Dark theme gist embed for blog
<style>
/* https://github.com/lonekorean/gist-syntax-themes */
@import url('https://cdn.rawgit.com/lonekorean/gist-syntax-themes/d49b91b3/stylesheets/idle-fingers.css');
@import url('https://fonts.googleapis.com/css?family=Open+Sans');
body {
font: 16px 'Open Sans', sans-serif;
}
body .gist .gist-file {
border-color: #555 #555 #444
@nguyenhoan1988
nguyenhoan1988 / install_dlib_conda.md
Created October 19, 2021 22:05
Installing dlib using conda with CUDA enabled

Installing dlib using conda with CUDA enabled

Prerequisite: conda and/or miniconda are already installed

  1. Create a conda environment.
$ conda create -n dlib python=3.8 cmake ipython
  1. Activate the environment.
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active April 16, 2024 14:21
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@bmaupin
bmaupin / free-database-hosting.md
Last active April 16, 2024 14:19
Free database hosting
@islandcontroller
islandcontroller / XilinxISE_Windows10_Guide.md
Last active April 16, 2024 14:18
Installing and using Xilinx ISE 14.7 on Windows 10