Skip to content

Instantly share code, notes, and snippets.

View 4ov's full-sized avatar
🇪🇬

Mohammed 4ov

🇪🇬
View GitHub Profile
@4ov
4ov / fix.bash
Created May 31, 2020 23:03
fix scrolling on xubuntu
#xfconf-query -c pointers -p /SynPS2_Synaptics_TouchPad/Properties/Synaptics_Scrolling_Distance -n -t int -t int -s [y] -s [x]
xfconf-query -c pointers -p /SynPS2_Synaptics_TouchPad/Properties/Synaptics_Scrolling_Distance -n -t int -t int -s -50 -s -50
@4ov
4ov / repl.it.remove.js
Created July 7, 2020 01:26
remove all repl.it apps in the same folder
let p = document.querySelectorAll('.jsx-525591542')
p.forEach(o =>{
setTimeout(()=>{
o.click()
document.querySelector('.jsx-612267399').click()
setTimeout(()=>{
let c = document.querySelector('.jsx-2943517159')
c.click()
}, 2000)
}, 1500)
@4ov
4ov / H.js
Last active August 20, 2020 15:28
h component
import React from 'react'
export default ({ size="16", style, className, children, weight="normal" }) =>{
//
return<span style={{ fontSize : `${size}pt`, fontWeight : weight,display : 'block', ...style }} className={className}>
{children}
import { serve } from "https://deno.land/std@0.79.0/http/server.ts";
const s = serve({ port: 8000 });
for await (const req of s) {
req.respond({ body: "4" });
}

Keybase proof

I hereby claim:

  • I am 4ov on github.
  • I am 4ov (https://keybase.io/4ov) on keybase.
  • I have a public key ASCHQARzNtK9RXRU_8c2jYvM0n6Iqpowbuert7h1DiFJYAo

To claim this, I am signing this object:

@4ov
4ov / main.js
Created June 6, 2021 17:57
example of deno-fetcher usage
import Fetcher from 'https://raw.githubusercontent.com/4ov/deno-fetcher/main/mod.ts'
const app = new Fetcher();
app.get('/', (event)=>{
event.respondWith(new Response('hola'))
})
addEventListener('fetch', app.handle.bind(app))
@4ov
4ov / lodash_settings.js
Created June 13, 2021 15:53
my lodash settings for templates
_.templateSettings = {
evaluate: /\~([^~]*?)\~/, ///{{--([\s\S]+?)}}/g,
interpolate: /{{([\s\S]+?)}}/g,
escape: /{{-([\s\S]+?)}}/g
};
// ~ eval ~
// {{ interpolate }}
// {{- escape }}
@4ov
4ov / linux.md
Last active June 23, 2021 15:18
every single trick i know

control media from terminal

tested on ubuntu 20.04 ref

xdotool key XF86AudioPlay
@4ov
4ov / ftp.v
Created September 12, 2021 13:22
import net.ftp
import os
const(
backup_dir = "backup"
)
fn main(){
println("Connecting...")
mut conn := ftp.new()
@4ov
4ov / deno.ts
Last active October 12, 2021 14:24
deno deploy env test
import { h, json, jsx, serve } from "https://deno.land/x/sift/mod.ts";
serve({
"/set": () => {
localStorage.x = `${Math.random()}`
return new Response("hola")
},