Skip to content

Instantly share code, notes, and snippets.

View marcelovani's full-sized avatar

Marcelo Vani marcelovani

View GitHub Profile
@Maxattax97
Maxattax97 / README.md
Last active November 13, 2023 12:10 — forked from magnetikonline/README.md
List all Git repository objects by size.

List all Git repository objects by size

Summary

Bash script to:

  • Iterate all commits made within a Git repository.
  • List every object at each commit.
@marcelovani
marcelovani / php
Created September 25, 2020 09:17 — forked from fvosberg/php
A very lightweight php backtrace
<?php
$debug_backtrace = debug_backtrace();
$output = [];
foreach ($debug_backtrace as $debug) {
if (isset($debug['class'])) {
$o = $debug['class'];
}
$o .= '::' . $debug['function'];
function generateCallTrace() {
$e = new \Exception();
$trace = explode("\n", $e->getTraceAsString());
// reverse array to make steps line up chronologically
$trace = array_reverse($trace);
array_shift($trace); // remove {main}
array_pop($trace); // remove call to this method
$length = count($trace);
$result = array();
@goebish
goebish / CX10_Blue_PCB.ino
Last active September 25, 2022 20:59
Cheerson CX-10 Tx Arduino Code (blue PCB)
// Update : a xn297 is not required anymore, it can be emulated with a nRF24l01 :
// https://gist.github.com/goebish/ab4bc5f2dfb1ac404d3e
// **************************************************************
// ****************** CX-10 Tx Code (blue PCB) ******************
// by goebish on RCgroups.com
// based on green pcb cx-10 TX code by closedsink on RCgroups.com
// based largely on flysky code by midelic on RCgroups.com
// Thanks to PhracturedBlue, hexfet, ThierryRC
// Hasi for his arduino PPM decoder
@fvosberg
fvosberg / php
Last active September 25, 2020 09:18
A very lightweight php backtrace
<?php
$debug_backtrace = debug_backtrace();
$output = [];
foreach ($debug_backtrace as $debug) {
if (isset($debug['class'])) {
$o = $debug['class'];
}
$o .= '::' . $debug['function'];
@agnoster
agnoster / README.md
Last active September 25, 2024 09:27
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@voxpelli
voxpelli / vptest.info
Created July 5, 2011 20:01
OAuth.module 3.x example - a test I made to verify the D7 port of the module - should work well on D6 as well though
name = VoxPelli OAuth Test
core = 7.x
dependencies[] = oauth_common
dependencies[] = http_client
@alkavan
alkavan / sksort.php
Created June 24, 2010 12:47
sksort
<?php
/**
* A function to sort data array element by one or two sub keys, both directions
*/
function sksort(&$array, $subkey = "id", $subkey2 = null ,$sort_ascending=false)
{
if (count($array))
$temp_array[key($array)] = array_shift($array);