Skip to content

Instantly share code, notes, and snippets.

View Sunchock's full-sized avatar
🚀
The hands on the keyboard, my head in a spaceship 👩‍🚀

Sunchock Sunchock

🚀
The hands on the keyboard, my head in a spaceship 👩‍🚀
View GitHub Profile
@Sunchock
Sunchock / PyPNGHelper.py
Last active April 13, 2024 01:14
A python module to help parsing PNG
#!/usr/bin/env python3
# This file represents the PNG file structure and its chunks
# Based on the PNG file format specification: https://www.w3.org/TR/PNG/
# NB: Some chunks are incomplete, feel free to complete them
#TODO: complete some chunks
PNG_SIGNATURE: bytes = b'\x89PNG\r\n\x1a\n'
@Sunchock
Sunchock / sassas.md
Created February 7, 2022 00:33 — forked from AdamMarsden/sassas.md
Sass Architecture Structure

Sass Architecture Structure

sass/
|
|– base/
|   |– _reset.scss       # Reset/normalize
|   |– _typography.scss  # Typography rules
|   ...                  # Etc…
|
@Sunchock
Sunchock / execute.php
Created September 16, 2020 07:48 — forked from fordnox/execute.php
Execute shell command with timeout and converting stderr to Exception if any
<?php
/**
* @param int $timeout - max process execution time in seconds until it is terminated
**/
function execute($cmd, $stdin = null, $timeout = 600)
{
$this->log->debug("executing: " . $cmd . " ". $stdin);
$cmd = str_replace("\n", "", $cmd);
$cmd = str_replace("\r", "", $cmd);