Skip to content

Instantly share code, notes, and snippets.

View lastguest's full-sized avatar
❄️
I may be slow to respond.

Stefano Azzolini lastguest

❄️
I may be slow to respond.
View GitHub Profile
@boaheck
boaheck / imgfucker.py
Last active May 24, 2022 05:44
ImageGlitcher
#!/usr/bin/env python
import random
import sys
cutLength = 1
pasteDist = 1
frames = 20
imgSequence = False
@foklepoint
foklepoint / .gitlab-ci.yml
Created July 8, 2017 20:25
Build and Push images to GCP Container Registry with Gitlab CI
image: docker:latest
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
variables:
DOCKER_DRIVER: overlay
GCP_PROJECT_ID: CHANGE-TO-GCP-PROJECT-ID
IMAGE_NAME: image_id
services:
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active June 10, 2024 01:49
Hyperlinks in Terminal Emulators
@lalyos
lalyos / README.md
Last active June 12, 2018 18:08
encrypted usb for ssh keys

Store your ssh private keys on an encrypted usb drive!

Format USB

You have to erase it twice Use DiskUtility:

    1. Erase with format: OS X Extendes (Journaled) and GUID Partition Map scheme
    1. Erase with format: OS X Extendes (Case-sensitive, Journaled, Encrypted) and GUID Partition Map scheme

Create rsa key on USB

General-purpose text preprocessing with the C preprocessor. Featuring JavaScript.

2017-02-15 Dariusz Jędrzejczak

http://djedr.github.io


Outline

@djedr
djedr / 2017-02-01.md
Last active December 28, 2023 15:23
Combining the C preprocessor and JavaScript

Note

This text is superseded by https://gist.github.com/djedr/7d21eac05ce2bbbca29b29d532a1fbe4.

Why

There are some reasons listed here. To expand on that, using the C preprocessor with JavaScript project also gives us an easy way to share constants between different files. Back-end (Node.js) and front-end (Angular, React). But you can also share constants between .js files and .css files or any other text formats. No fuss. Just #include "constants.cpp".

Macros that operate on plain text are more limited and sloppier than macros that operate on syntax trees, like sweet.js. But they are also simpler. And very often enough.

Also:

  • cpp is simple
@marians
marians / main.go
Created January 27, 2017 10:25
OAuth 2.0 authentication in a Golang CLI
package main
import (
"context"
"crypto/tls"
"fmt"
"log"
"net/http"
"net/url"
"time"
@mplacona
mplacona / gist:614ffdacc7da223f8a6121cd4b7a2eee
Last active October 27, 2023 08:22 — forked from jimbojsb/gist:1630790
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@simonewebdesign
simonewebdesign / install-quake3.sh
Last active November 14, 2023 19:25
Install Quake 3: Arena on a mac
#!/bin/bash
# Install Quake 3: Arena on a mac
# Copyright (c) 2016 simonewebdesign
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
/*
Solution of: https://www.codewars.com/kata/545434090294935e7d0010ab
*/
var query = function () {
var self = {};
var tables = [];
var selector = null;