Skip to content

Instantly share code, notes, and snippets.

View elisbyberi's full-sized avatar
😎
I may be slow to respond.

Elis Byberi elisbyberi

😎
I may be slow to respond.
  • Tirana, Albania
  • 02:11 (UTC +02:00)
View GitHub Profile
@elisbyberi
elisbyberi / vdi-file-compacting.md
Created August 23, 2020 16:32 — forked from kuznero/vdi-file-compacting.md
How to compact VirtualBox's VDI file size?

Source: StackOverflow

1. Run defrag in the guest (Windows only)

2. Nullify free space:

With a Linux Guest run this:

sudo dd if=/dev/zero | pv | sudo dd of=/bigemptyfile bs=4096k
sudo rm -rf /bigemptyfile
@elisbyberi
elisbyberi / gist:111097c128ee501ef5ccc3c3be126d47
Created February 28, 2020 23:34 — forked from creotiv/gist:1245476
JavaScript JPEG encoder
/**
http://closure-library.googlecode.com/svn-history/r440/trunk/third_party/closure/goog/jpeg_encoder/jpeg_encoder_basic.js
* @license
Copyright (c) 2008, Adobe Systems Incorporated
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

Swift Meets C/C++

This gist is a simple example on how to call a function written in swift from C/C++, without taking the detour via Objective-C/C++.


Analytics

In this example we're going to invoke a function called say_hello, which, as the name already suggests, prints "Hello, World!" to the terminal.

<html>
<head>
<script type="text/javascript" src="./jquery-1.4.3.min.js"></script>
<script type="text/javascript">
var baseURL = 'http://en.wiktionary.org';
function showPage(page,text) {
var sourceurl = baseURL + '/wiki/' + page;
$('#pagetitle').text(page);
$('#wikiInfo').html(text);
$('#sourceurl').attr('href',sourceurl);