Skip to content

Instantly share code, notes, and snippets.

View somq's full-sized avatar
🎯
Focusing

Clément somq

🎯
Focusing
View GitHub Profile
@somq
somq / KB-Buying-guide-EU.md
Created December 2, 2022 15:30 — forked from henfiber/KB-Buying-guide-EU.md
Buying keyboards and keyboard components from EU

Europe

@somq
somq / convert_x265_to_x264
Created September 12, 2020 15:25
Convert x264 to x265 files found in a folder with ffmpeg
#!/bin/bash
FOLDER=$PWD/*.mkv
for filename in $FOLDER; do
echo "Processing $filename file..."
INPUT=$filename
OUTPUT="${filename/.mkv/_x264.mkv}"
echo "Processing echo "${filename/.mkv/_x264.mkv}" file..."
ffmpeg -y -i $INPUT -c:v libx264 -crf 18 -c:a copy $OUTPUT
@somq
somq / keyboard-attach.service.ts
Created August 16, 2020 22:21
Ionic 5 Keyboard Attach Service
import { Injectable, OnDestroy } from '@angular/core';
import { Plugins } from '@capacitor/core';
import { Platform } from '@ionic/angular';
import { fromEvent, Subscription } from 'rxjs';
const { Keyboard } = Plugins;
/**
* @originalsource https://gist.github.com/Manduro/bc121fd39f21558df2a952b39e907754
*
* Usage
@somq
somq / ionic5-run-multiple-devices.sh
Created July 26, 2020 15:33
ionic5-run-multiple-devices.sh
#!/bin/bash
default_port=8000
deviceLst=$(adb devices | awk 'NR > 1 {print $1}' | sed ':a;N;$!ba;s/\n/ /g')
IFS=' ' read -a array <<< "$deviceLst"
## Clean old background processes
old_processes=$(pgrep -f 'sh -c ionic cordova run')
@somq
somq / ansible-2.7to2.8-issue.log
Created May 20, 2019 16:53
ansible-2.7to2.8-issue.log
root@cobox:~# ansible-playbook ansible/playbook.yml --extra-vars "vm_version=0.2.1 current_env=development current _provider=vagrant" -vvv
ansible-playbook 2.7.10
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 2.7.15rc1 (default, Nov 12 2018, 14:31:15) [GCC 7.3.0]
Using /etc/ansible/ansible.cfg as config file
/etc/ansible/hosts did not meet host_list requirements, check plugin documentation if this is unexpected
/etc/ansible/hosts did not meet script requirements, check plugin documentation if this is unexpected
@somq
somq / android
Created September 25, 2018 21:44
Android 6 trace webview
09-25 23:41:25.837 14642-14642/io.ionic.starter I/art: Late-enabling -Xcheck:jni
09-25 23:41:25.963 14642-14642/io.ionic.starter W/System: ClassLoader referenced unknown path: /data/app/io.ionic.starter-1/lib/arm
09-25 23:41:25.999 14642-14642/io.ionic.starter I/CordovaLog: Changing log level to DEBUG(3)
09-25 23:41:25.999 14642-14642/io.ionic.starter I/CordovaActivity: Apache Cordova native platform version 6.3.0 is starting
09-25 23:41:25.999 14642-14642/io.ionic.starter D/CordovaActivity: CordovaActivity.onCreate()
09-25 23:41:26.008 14642-14642/io.ionic.starter I/WebViewFactory: Loading com.google.android.webview version 69.0.3497.100 (code 349710000)
09-25 23:41:26.243 14642-14642/io.ionic.starter I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TracingControllerAdapter>
Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TracingControllerAdapter>
09-25 23:41:26.276 14642-14642/io.ionic.starter I/cr_LibraryLoader: T
@somq
somq / config.xml
Created September 25, 2018 19:47
ionic4 sidemenu config.xml
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.starter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>i4-sidemenu</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
import { Component, OnInit, Input, EventEmitter, Output, NgModule } from '@angular/core';
@Component({
selector: 'button-view',
template: `
<button type="button" class="btn btn-outline-secondary" ngbPopover="You see, I show up on hover!" triggers="mouseenter:mouseleave" popoverTitle="Pop title">
{{ value }}
</button>
`,
})