Skip to content

Instantly share code, notes, and snippets.

View jsamr's full-sized avatar

Jules Sam. Randolph jsamr

  • QAWolf
View GitHub Profile
@jsamr
jsamr / dwin10
Last active October 12, 2016 18:46
KVM + SPice Windows VM daemon script
#!/bin/bash
# • Following packages must be installed :
# - qemu
# - samba
# - spice-vdagent
# - virt-viewer
# • SPICE driver needed in guest from https://www.spice-space.org/download/windows/spice-guest-tools/spice-guest-tools-0.100.exe
# • For libvirtd to work for user, add user to libvirtd group and reboot
# > usermod -a -G libvirtd USER
@jsamr
jsamr / vwin10
Created October 10, 2016 16:12
KVM + SPice Windows VM client script
#!/bin/bash
# Need to install remote-viewer
remote-viewer -f -t "windows 10" spice://localhost:5900
 v 1.1.0

 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 |||                                                                           |||
 !!! MERCI DE LIRE ATTENTIVEMENT CE DOCUMENT AVANT DE COMMENCER LE LABORATOIRE !!!
 |||                                                                           |||
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
@jsamr
jsamr / leechblock worktime
Created December 6, 2016 14:54
A file for leechblock
www.facebook.com
facebook.com
youtube.com
feedly.com
twitter.com
www.lemonde.fr
www.facebook.com
twitter.com
@jsamr
jsamr / bootiso
Last active April 4, 2021 23:23
A bash script to very easily create a bootable USB device from one ISO file. Just curl it, chmod it and go!
#!/bin/bash
# Author: jules randolph <jules.sam.randolph@gmail.com> https://github.com/jsamr
# License: MIT
#
# Usage: [<options>] <file.iso>
#
# Create a bootable FAT32 USB device from a linux-GNU/unix ISO.
#
# Options
@jsamr
jsamr / affirmation
Created July 21, 2018 13:07
MuleSoft Contributor Agreement Acceptance by Jules Samuel Randolph
I, Jules Samuel Randolph, have read and do accept the MuleSoft Contributor Agreement
at http://www.mulesoft.org/legal/contributor-agreement.html
Accepted on Sat Jul 21 2018 09:07:16 GMT-0400 (EDT)
@jsamr
jsamr / Table.jsx
Created March 8, 2019 15:01
React native table
import React, { PureComponent } from 'react'
import { WebView } from 'react-native-webview'
const htmlStyle = `
:root {
color: #333333;
background-color: transparent;
}
body, html {
margin: 0;
// Type definitions for patchinko v4.1.0
// Project: patchinko
// Typescript: 3.1.6
// Definitions by: Jules Samuel Randolph <https://github.com/jsamr>
declare module 'patchinko' {
type DeepPartial<T> = {
[P in keyof T]?: T[P] extends Array<infer U> ? Array<DeepPartial<U>> : T[P] extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : DeepPartial<T[P]>;
}
// Utility types
function useDelayedRendering<T>({
element,
delay = 200,
}: {
element: T;
delay: number;
}) {
const [renderedEl, setRenderedEl] = useState(element);
const lastRenderedAt = useRef(Date.now());