Skip to content

Instantly share code, notes, and snippets.

View julianYaman's full-sized avatar

Julian Yaman julianYaman

View GitHub Profile

Self-Host Sharelatex Server

Create user

User erstellen mit Homeverzeichnis useradd -m test

Install Docker

Arch Linux (yay)

yay -S docker

@meain
meain / loading_messages.js
Last active November 18, 2024 12:25
Funny loading messages
export default [
"Reticulating splines...",
"Generating witty dialog...",
"Swapping time and space...",
"Spinning violently around the y-axis...",
"Tokenizing real life...",
"Bending the spoon...",
"Filtering morale...",
"Don't think of purple hippos...",
"We need a new fuse...",
@matthewzring
matthewzring / markdown-text-101.md
Last active November 18, 2024 08:27
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers:

@julianYaman
julianYaman / mongoregex_example.php
Last active January 6, 2017 19:44
MongoRegex - Matching the exact word
// Example: You have following documents with following content
// ['yourstring','yourstring1','1yourstring','23yourstring','your2string']
// You only want the first document with the content "yourstring"
// but you don´t want to care about large and lowercase when somebody tries to find the document.
// Here is the solution:
// Connection to MongoDB
$m = new MongoClient();
// Our search string
@ythecombinator
ythecombinator / change-commit-date.md
Last active March 16, 2022 18:35
Changin' a commit timestamp.

Changing a commit date info

Reason

My country is under a daylight saving time period and not all my commits are made during the morning/afternoon. Because I commited after 11:00 PM - which, given the local DST, was after 00:00 AM - my 100+ days commit streak got broken - which made me very unhappy.

The process

@MartinMuzatko
MartinMuzatko / comma.js
Last active August 15, 2024 05:13
JS Commarization, Number to words from Million, Billion, Trillion.... and extendible
function commarize()
{
// 1e6 = 1 Million, begin with number to word after 1e6.
if (this >= 1e6)
{
var units =
[
"Million",
"Billion",
"Trillion",
@montanaflynn
montanaflynn / kong-dns.md
Last active March 2, 2022 12:46
Example of using Kong with DNS

Kong

Kong is a powerful proxy built on nginx. By taking a request and passing it to an upstream server and then returning the result to the client Kong can perform his magic. To know which requests go to which service Kong looks for a Host header to match against. There's a few other ways Kong can match requests to services but for now that's the most basic route. Pun intended.

Start

Assuming everything has been installed and setup, such as dependencies and config files which can be found in the docs, it's time to turn Kong on. The first time Kong runs you'll see some Kong config values and initial migrations to the datastore.

kong start
@cojohn
cojohn / basic-http-auth-node.js
Created February 8, 2012 18:53
Basic HTTP Authorization Header in Node.js
var key = <my key>,
secret = <my secret>,
https = require("https"),
https_options = {
"host": <host>,
"path": <path>,
"port": <port>,
"method": <method>,
"headers": {
"Authorization": "Basic " + new Buffer(key + ":" + secret, "utf8").toString("base64")