Skip to content

Instantly share code, notes, and snippets.

View sangimed's full-sized avatar

Mohamed I. sangimed

View GitHub Profile
import argparse
import random
import string
def generate_random_string(length=10, prefix=""):
"""Générer une chaîne de caractères aléatoire de longueur donnée avec un préfixe optionnel."""
random_string = ''.join(random.choices(string.ascii_letters + string.digits, k=length))
return f"{prefix}{random_string}"
sangimed / mine_flux.bat
Last active May 8, 2022 21:25
Flux mining script with confirmation message (could be generalized to any miner)
@echo off
echo wscript.Quit((msgbox("Launch the ETH/ZIL dual mining script and make some $$$ ?",4+32+256, "Your Title Here")-6) Mod 255) > %temp%\msgbox.vbs
start /wait %temp%\msgbox.vbs
rem echo wscript returned %errorlevel%
if errorlevel 1 goto error
echo We have Yes
goto end

Keybase proof

I hereby claim:

  • I am sangimed on github.
  • I am sangimed ( on keybase.
  • I have a public key ASBYe3rKpVLDp3--0IEpuJIyKtRRO85ZFAxzdcaDaGPUSgo

To claim this, I am signing this object:

sangimed / capture_device.txt
Created April 20, 2021 20:18
Read Capture Device into VLC in 1080p60
# Change dshow-adev and dshow-vdev values according to your Capture device name.
"C:\Program Files\VideoLAN\VLC\vlc.exe" dshow:// :dshow-size="1920x1080" :dshow-vdev="USB3.0 HD Video Capture" :dshow-adev="Microphone (USB3.0 HD Audio Capture)" :dshow-aspect-ratio="16:9" :dshow-audio-samplerate=48000 :dshow-audio-channels=2 :live-caching=0 :dshow-fps=60
twitch-videoad.js application/javascript
(function() {
if ( /(^|\.)twitch\.tv$/.test(document.location.hostname) === false ) { return; }
var realFetch = window.fetch;
window.fetch = function(input, init) {
if ( arguments.length >= 2 && typeof input === 'string' && input.includes('/access_token') ) {
var url = new URL(arguments[0]);
url.searchParams.forEach(function(value, key) {
sangimed / Z Command example
Last active March 27, 2019 14:18
Z command example
# Accessing to some directories for the first time.
cd Repositories/watc/src/main/java/com/mohamedibrihen/watc/service
cd ../endpoint
cd ../utils
# Accessing quickly via the Z command
sangimed@ubuntu ~ z watc service
sangimed@ubuntu ~ /Repositories/watc/src/main/java/com/mohamedibrihen/watc/service
sangimed@ubuntu ~ z endpoint
sangimed /
Created October 4, 2018 15:28
Call a plsql procedure with JPA in Spring
package mypackage;
import javax.persistence.EntityManager;
import javax.persistence.ParameterMode;
import javax.persistence.PersistenceContext;
import javax.persistence.StoredProcedureQuery;
import org.springframework.stereotype.Component;
sangimed / contentscriptUtils.js
Created April 13, 2018 09:37
Utils of my chrome extension before refactoring it
'use strict';
// ----- utils.js -----
* Defines the tags on which the extension will be triggered.
// Copyright (c) 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
* Get the current URL.
* @param {function(string)} callback called when the URL of the current tab
* is found.
sangimed / insertDummyDataset.rq
Last active February 24, 2017 13:37
dataset for the Travel's triplestore project
PREFIX rdf: <>
PREFIX rdfs: <>
PREFIX users: <>
PREFIX trips: <>
PREFIX travelers: <>
PREFIX global: <>
PREFIX travel: <>
PREFIX text: <>
PREFIX tr: <>
PREFIX xsd: <>