Skip to content

Instantly share code, notes, and snippets.

@Sinewyk
Sinewyk / vimium_c-20250630_183044.json
Created June 30, 2025 16:33
vimium-c conf + container tab + azertyified
{
"name": "Vimium C",
"@time": "30/06/2025, 18:30:44",
"time": 1751301044931,
"environment": {
"extension": "2.12.3",
"platform": "win",
"firefox": 140
},
"clipSub": [
@Sinewyk
Sinewyk / Microsoft.PowerShell_profile.ps1
Created April 13, 2025 13:23
Powershell profile for git
function Get-GitStatus { & git status -sb $args }
Set-Alias -Name gst -Value Get-GitStatus -Force -Option AllScope
Set-Alias -Name gs -Value Get-GitStatus -Force -Option AllScope
function Get-GitDiff { & git diff $args }
Set-Alias -Name gd -Value Get-GitDiff -Force -Option AllScope
function Get-GitCommit { & git commit -v $args }
Set-Alias -Name gc -Value Get-GitCommit -Force -Option AllScope
@Sinewyk
Sinewyk / serialize.js
Created March 12, 2024 18:43
serialize from form element
/**
* Serialize values from a DOMNode (should probably be an input)
* @param {DOMNode} el The element you want to serialize
* @return {object} The couple { object, value } of the serialized field
*
* @note Needs an Array.from es6 polyfill
* because of destructuring of NodeList DOM stuff
*/
export function serializeValueFromDOMNode(/* HTMLFormElement */ el) {
const name = el.name;
@Sinewyk
Sinewyk / gist:3321dc4eefa042cbb6021218f7adc869
Created March 11, 2020 16:28
Fuck gnome move workspace up & down for visual code copy line up & down
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-down "['']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-up "['']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down "['']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up "['']"
https://start.duckduckgo.com/?q=%s&kak=-1&kal=-1&kao=-1&kaq=-1&kp=-2&kz=-1&kav=1&kn=1&k1=-1&kaj=m&kax=-1&kap=-1&kau=-1&kba=-1&kae=d&ks=l&kw=s&km=m&ia=web
@Sinewyk
Sinewyk / withState.ts
Last active March 23, 2019 18:09
diff @cycle/state
diff --git a/state/src/withState.ts b/state/src/withState.ts
index 030084c1..aa91388f 100644
--- a/state/src/withState.ts
+++ b/state/src/withState.ts
@@ -39,11 +39,13 @@ export function withState<
xs.fromObservable<Reducer<T>>(sinks[name]),
xs.never()
);
- stream$.subscribe({
- next: i => schedule(() => reducerMimic$._n(i)),
@Sinewyk
Sinewyk / userChrome.css
Created November 14, 2017 19:42
Hide tab bar top of FF 57
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
#TabsToolbar { visibility: collapse; }
@Sinewyk
Sinewyk / myBug.js
Last active June 18, 2017 13:30
I'm missing something in how to fix this ...
import { just, iterate } from 'most';
const inputString = 'initial';
just(inputString)
.tap(x => console.log(`my initial string ${x}`))
.chain(() => iterate(x => x + 1, 1))
.tap(x => console.log(`generated chapter url ${x}`))
.take(4) // If I remove this line, I get the requests starting, but then I get stuck in an infinite loop of generated chapters url
.map(x => {
const set = [0, 1, 2];
const retry = n => stream => stream.recoverWith(e => n === 0 ? most.throwError(e) : retry(n - 1, stream));
let i = 0;
most.from(set)
.tap(x => {
if (i === 0 && x === 2)
{
i++;
#!/bin/bash
apt-get update
apt-get install bind9
cat <<EOF > /etc/bind/named.conf.options
options {
directory "/var/cache/bind";
forwarders {
8.8.8.8;
8.8.4.4;