Skip to content

Instantly share code, notes, and snippets.

View pparidans's full-sized avatar
💭
I may be slow to respond.

Pierre Paridans pparidans

💭
I may be slow to respond.
View GitHub Profile
@pparidans
pparidans / wsl-port-forwarding.ps1
Created July 3, 2020 15:48
WSL2 Port Forwarding
$remoteport = bash.exe -c "ip address show eth0 | grep 'inet '"
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if( $found ){
$remoteport = $matches[0];
} else{
echo "The Script Exited, the ip address of WSL 2 cannot be found";
exit;
}
Array.from(document.querySelectorAll('table.A1JAINC-O-A.A1JAINC-O-B tr td:nth-child(2) h3')).map(r => r.innerHTML).map(r => parseInt(r.replace(',',''), 10)).reduce((r,m) => r+m, 0)
convert -density 200x200 -quality 60 -compress jpeg input.pdf output.pdf
"
" requires: pathogen, sensible, commentary, surround, ctrlp
"
execute pathogen#infect()
set expandtab softtabstop=4 shiftwidth=4
autocmd FileType ruby setlocal expandtab shiftwidth=2 softtabstop=2
colorscheme vividchalk
export function parseJSON(response) {
return response.json()
}
export function checkStatus(response) {
if (response.status >= 200 && response.status < 300) {
return response
} else {
const error = new Error(response.statusText)
error.response = response
diff --git a/configure.in b/configure.in
index 375ef55..5608a21 100644
--- a/configure.in
+++ b/configure.in
@@ -788,6 +788,9 @@ rb_cv_warnflags="$warnflags"
if test "$GCC:${warnflags+set}:no" = yes::no; then
if test $gcc_major -ge 4; then
extra_warning=-Werror=extra-tokens
+ if test $gcc_major -gt 4 -o $gcc_minor -ge 4; then
+ extra_warning="$extra_warning -Wno-packed-bitfield-compat"
find . -name "*.mp4" -print0 | xargs -0 -I mp4file ffmpeg -i mp4file -vn -c:a copy mp4file.m4a
export function nodeList2Array(nodeList) {
return Array.prototype.slice.call(nodeList)
}
export default nodeList2Array
timedatectl set-timezone 'Europe/Brussels'
hostnamectl set-hostname <hostname>
vi /etc/hosts
<public_ip> <fqdn> <hostname>
vi /etc/cloud/cloud.cfg
preserve_hostname: 1

"Lourd est le parpaing de la réalité sur la tartelette aux fraises de nos illusions." Boulet

"La violence est le dernier refuge de l'incompétence." Isaac Asimov