Skip to content

Instantly share code, notes, and snippets.

View G-Ray's full-sized avatar

Geoffrey Bonneville G-Ray

View GitHub Profile
@G-Ray
G-Ray / osx-kvm-libvirt-vga-resolution.md
Created May 13, 2023 15:36
OSX-KVM-libvirt-resolution

To set a custom resolution > 1920x1080 in a OSX-KVM VM, edit the libvirt xml with:

<video>
  <model type="vga" vram="32768" heads="1" primary="yes">
    <resolution x="3440" y="1440"/>
  </model>
  <alias name="video0"/>
  <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0"/>

Keybase proof

I hereby claim:

  • I am g-ray on github.
  • I am utopik (https://keybase.io/utopik) on keybase.
  • I have a public key ASC8QlK29awqCpxd1DPz1at8lMr6jv4URmwnFzG4gcO2sAo

To claim this, I am signing this object:

@G-Ray
G-Ray / random-access-idb-25mb-test.js
Created January 24, 2019 15:36
store a 25 mb image in base64 with random-access-idb
var test = require('tape')
var random = require('../')('testing-' + Math.random(), { size: 1000000 })
var url = 'https://images.pexels.com/photos/936722/pexels-photo-936722.jpeg'
const fetchAsBlob = url => fetch(url)
.then(response => response.blob())
const convertBlobToBase64 = blob => new Promise((resolve, reject) => {
const reader = new FileReader()
@G-Ray
G-Ray / gist:b31d5f5950dac5e96613
Created May 18, 2015 21:18
cpasbien scraper
socket.on('msg', function(msg){
if(msg['cpb_request']) {
var url = msg['cpb_request']; //url de cpasbien avec recherche sur les films en x264
console.log(url);
request(url, function(error, response, html) {
var cheerio = require('cheerio');
var $ = cheerio.load(html);
var json = {"MoviesList": []}
var MovieList = [];
/**
* Created by geoffrey on 26/02/14.
*/
import java.lang.ref.SoftReference;
import java.net.ServerSocket;
import java.net.Socket;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.InputStreamReader;
import java.io.BufferedReader;