Skip to content

Instantly share code, notes, and snippets.

View icebreaker's full-sized avatar
👽
Code gardening!

Mihail Szabolcs icebreaker

👽
Code gardening!
View GitHub Profile
@icebreaker
icebreaker / rgb.go
Created October 4, 2024 12:46 — forked from nitoyon/rgb.go
Generate Animation GIF with Golang
package main
import (
"fmt"
"image"
"image/color"
"image/gif"
"math"
"os"
)
@icebreaker
icebreaker / main.go
Created October 4, 2024 12:45 — forked from rabet/main.go
Write text into image with Go (with font.Drawer)
// Copyright 2015 The Freetype-Go Authors. All rights reserved.
// Use of this source code is governed by your choice of either the
// FreeType License or the GNU General Public License version 2 (or
// any later version), both of which can be found in the LICENSE file.
// +build example
//
// This build tag means that "go install github.com/golang/freetype/..."
// doesn't install this example program. Use "go run main.go" to run it or "go
// install -tags=example" to install it.
@icebreaker
icebreaker / ANSI.md
Created October 4, 2024 10:11 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@icebreaker
icebreaker / Linux_DRM_OpenGLES.c
Created September 30, 2024 23:37 — forked from robertkirkman/Linux_DRM_OpenGLES.c
An example, inspired by Rob Clark "kmscube.c" that uses Linux Direct Rendering Manager ( DRM ) and EGL to create an OpenGL ES 2 context. This is a standalone example, that just clears the screen with a blueish color. This is a fork of Miouyouyou's gist intended for use with the BeagleBone Black's IT PowerVR SGX530 GPU.
// gcc -o drmgl Linux_DRM_OpenGLES.c `pkg-config --cflags --libs libdrm` -lgbm -lEGL -lGLESv2 -ldl -lsrv_um -I/usr/include/gbm -lIMGegl -ldrm_omap
/*
* Copyright (c) 2012 Arvin Schnell <[email protected]>
* Copyright (c) 2012 Rob Clark <[email protected]>
* Copyright (c) 2013 Anand Balagopalakrishnan <[email protected]>
* Copyright (c) 2017 Miouyouyou <Myy> <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@icebreaker
icebreaker / build_mac.sh
Created March 29, 2024 20:56 — forked from SchizoDuckie/build_mac.sh
Build an OSX .pkg installer from Linux using mkbom and xar
#!/bin/bash
# change the values below to match your system.
# target the BUILD_DIR to output from an nw.io build process. nwjs-shell-builder recommended!
# https://github.com/Gisto/nwjs-shell-builder
# BASE_DIR is the target directory for this script, where files will be gathered and packaged to
BUILD_DIR=”/var/www/deploy/TMP/osx-ia32/latest-git”
BASE_DIR=”/var/www/deploy/osx” 
@icebreaker
icebreaker / revprox.go
Created May 27, 2023 19:33 — forked from JalfResi/revprox.go
Simple reverse proxy in Go
package main
import(
"log"
"net/url"
"net/http"
"net/http/httputil"
)
func main() {
@icebreaker
icebreaker / download.cpp
Created November 28, 2022 08:47 — forked from nem0/download.cpp
Donwload file on windows without 3rd party
#include <urlmon.h>
#pragma comment(lib, "urlmon.lib")
bool download(const char* url, OutputMemoryStream& blob) {
IStream* stream = nullptr;
if (S_OK != URLOpenBlockingStream(nullptr, url, &stream, 0, nullptr)) {
return false;
}
char buffer[4096];
ULONG read = 0;
@icebreaker
icebreaker / main.cpp
Created August 4, 2022 10:47 — forked from YukiSnowy/main.cpp
example SDL2 Direct3D9 application
// g++ *.cpp -o d3d9 -lmingw32 -lSDL2main -lSDL2 -I/dxsdk/include -L/dxsdk/lib -DUNICODE -ld3d9 -ld3dx9
// http://blog.fourthwoods.com/2011/08/11/setting-up-mingw-for-directx/
// http://www.directxtutorial.com/Lesson.aspx?lessonid=9-4-4
#include <iostream>
using namespace std;
#include <SDL2/SDL.h>
#include <windows.h>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<events>
<event name="publish:end:remote">
<handler type="MyApp.Publishing.APICaller, MyApp.Publishing" method="CallAPIMethod" />
</event>
</events>
</sitecore>
</configuration>
using Sitecore.Caching;
using Sitecore.Caching.Generics;
using Sitecore.Configuration;
using Sitecore.Diagnostics;
using Sitecore.Sites;
using System;
using System.Collections;
namespace MyApp.Publishing
{