Skip to content

Instantly share code, notes, and snippets.

View Zibri's full-sized avatar
❤️‍🔥

Zibri Zibri

❤️‍🔥
View GitHub Profile
// Uncompressed version of
// https://gist.github.com/munificent/b1bcd969063da3e6c298be070a22b604
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#include <stdbool.h> // 2008-2019
const int HEIGHT = 40;
const int WIDTH = 80;
@plugnburn
plugnburn / README.md
Last active April 17, 2024 22:09
NokiaTool - simple interface Bash script for MediaTek-based Nokia simple phones

NokiaTool: control MediaTek-based Nokia phones from your PC

Overview

NokiaTool is a simple Bash script (nokiatool.sh) that allows you to use an undocumented serial connection in USB-enabled MediaTek-based Nokia feature phones manufactured by Microsoft (even the most basic ones, like the new 105) in order to control them from your PC.

This project is an ongoing work and uses only some bits and pieces of information about the phone internals available to the public, so under any circumstances don't consider it stable or a replacement for official tools if any are present.

@danharper
danharper / background.js
Last active March 30, 2024 18:25
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});
@munificent
munificent / generate.c
Last active March 18, 2024 08:31
A random dungeon generator that fits on a business card
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
@AndreasMadsen
AndreasMadsen / gist:2693051
Created May 14, 2012 10:04
base64 shim [atob, btoa]
// Source: http://code.google.com/p/gflot/source/browse/trunk/flot/base64.js?r=153
/* Copyright (C) 1999 Masanao Izumo <iz@onicos.co.jp>
* Version: 1.0
* LastModified: Dec 25 1999
* This library is free. You can redistribute it and/or modify it.
*/
/*
* Interfaces:
@zeph1e
zeph1e / bashrc_id.sh
Created March 8, 2017 07:18
bashrc_id.sh
#!/bin/bash
export CRED=root@id
SSH=$(whereis ssh | awk '{print $2}')
JQ=$(whereis jq | awk '{print $2}')
SCP=$(whereis scp | awk '{print $2}')
if [ -z "$SSH" ]; then
echo "Unable to find ssh" 1>&2
return 1
@Zibri
Zibri / crt.css
Last active April 2, 2023 13:02
CRT effect with flickering scanlines and RGB grid.
// CRT effect with flickering scanlines and RGB grid.
// By zibri@zibri.org
// <html class="crt"> </html>
@keyframes flicker {
50% {
top: -3px
}
}
@SunboX
SunboX / inlineworker.js
Created June 24, 2013 12:21
Create web workers without a separate worker JS files. Source: http://jsbin.com/owogib/8/
function worker() {
setInterval(function() {
postMessage({foo: "bar"});
}, 1000);
}
var code = worker.toString();
code = code.substring(code.indexOf("{")+1, code.lastIndexOf("}"));
var blob = new Blob([code], {type: "application/javascript"});
@munshkr
munshkr / The C64 Digi
Last active September 14, 2021 16:52
The C64 Digi ~ C=Hacking #20
<=============
The C64 Digi
=============> Robin Harbron <macbeth@psw.ca>
Levente Harsfalvi <levente@terrasoft.hu>
Stephen Judd <sjudd@ffd2.com>
Introduction
------------
Digis -- digitally sampled audio -- are fairly common on the 64. This is