Skip to content

Instantly share code, notes, and snippets.

View alranel's full-sized avatar
👨‍💻

Alessandro Ranellucci alranel

👨‍💻
View GitHub Profile
@alranel
alranel / authors.sh
Last active May 9, 2022 05:37
This script can be used on a git repository to extract the contributors with the purpose of listing potential copyright holders on a given codebase. If invoked with a sub-path, it will only consider that file or directory.
#!/bin/sh
# Syntax: authors.sh [ PATH ]
LC_CTYPE=C
LANG=C
# Get all files in HEAD, skipping the bootloaders directory
files=$(git ls-tree -r --name-only HEAD "$1" | grep -v "^bootloaders" | grep -v "^firmwares" | xargs grep -Il "")
@alranel
alranel / block_personal_appts.js
Last active January 23, 2023 15:10 — forked from ttrahan/block_personal_appts
Google Apps Script to automatically create, edit and delete events on work calendar for personal calendar events. Inspired by @willroman's work but heavily changed. Instructions on how to set up can be found in the original post: https://medium.com/@willroman/auto-block-time-on-your-work-google-calendar-for-your-personal-events-2a752ae91dab
var source_calendars = [
'xxx',
];
function sync() {
var today = new Date();
var enddate = new Date();
enddate.setDate(today.getDate()+90); // how many days in advance to monitor and block off time
var sourceEvents = [];
@alranel
alranel / patch-wxwidgets-noquicktime.diff
Last active May 4, 2017 16:51
Changed according to @mkdryden's report
https://trac.macports.org/ticket/52069
http://trac.wxwidgets.org/changeset/f6a2d1caef5c6d412c84aa900cb0d3990b350938/git-wxWidgets
--- src/osx/carbon/dataobj.cpp
+++ src/osx/carbon/dataobj.cpp
@@ -29,10 +29,6 @@
#include "wx/osx/private.h"
-#if wxOSX_USE_COCOA_OR_CARBON
<!DOCTYPE html>
<html xmlns:fb='http://www.facebook.com/2008/fbml' xmlns:og='http://ogp.me/ns#' xmlns='http://www.w3.org/1999/xhtml'>
<head><script type="text/javascript">var NREUMQ=NREUMQ||[];NREUMQ.push(["mark","firstbyte",new Date().getTime()]);</script>
<title>FabLabs.io - The Fab Lab Network</title>
<base target='_parent'>
<meta content='width=device-width, initial-scale=1.0, user-scalable=no' name='viewport'>
<meta content='FabLabs.io - The Fab Lab Network' property='og:title'>
<meta content='FabLabs.io - The Fab Lab Network' property='og:site_name'>
<meta content='https://www.fablabs.io/embed' property='og:url'>
<meta content='https://www.fablabs.io/logo.jpg' property='og:image'>
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>cloudflare-nginx</center>
</body>
</html>
@alranel
alranel / gist:3005407
Created June 27, 2012 17:03
A webserver to process files through Slic3r
#!/usr/bin/perl
use Dancer;
use File::Slurp qw(read_file);
use File::Temp qw(tempfile);
post '/slice' => sub {
if (my $upload = upload 'stl') {
my (undef, $tmp) = tempfile();
system qw(/path/to/slic3r.pl --load /path/to/config.ini), $upload->tempname, qw(-o), $tmp
#ifndef bgu_poly2av_h_
#define bgu_poly2av_h_
#include "myinit.h"
#include <boost/geometry/algorithms/num_points.hpp>
SV*
polygon2perl(pTHX_ const polygon& poly)
{
AV* av = newAV();
xt/moox-types.t .................... 1/?
# Failed test 'Built-in Moose type ok'
# at xt/moox-types.t line 36.
# got: '__ANON__'
# expected: 'Str'
# Failed test 'External (MooseX::Types type) ok'
# at xt/moox-types.t line 37.
# got: '__ANON__'
# expected: 'MooseX::Types::Common::Numeric::PositiveInt'
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.