Skip to content

Instantly share code, notes, and snippets.

View dardourimohamed's full-sized avatar

Mohamed Dardouri dardourimohamed

  • @mahdCompany
  • Tunisia
View GitHub Profile
@dardourimohamed
dardourimohamed / .vimrc
Last active February 9, 2016 15:52
My favourite vim modules
" File: .vimrc
" Author: Jake Zimmerman <jake@zimmerman.io>
"
" How I configure Vim :P
"
" Gotta be first
set nocompatible
filetype off
@dardourimohamed
dardourimohamed / brightness
Created May 24, 2018 22:19
Backlight brightness incerement/decrement. usage : increment : "brightness intel_backlight 10" or decrement : "brightness intel_backlight -10"
#!/bin/bash
DEVICE=$1
VALUE=$2
FILE="/sys/class/backlight/$DEVICE/brightness"
CURR_VALUE=$( cat "$FILE" )
VALUE="$(( $CURR_VALUE + $VALUE ))"
@dardourimohamed
dardourimohamed / message-teams.js
Created November 3, 2020 15:22
Send Adaptive card to MS Teams channel using REST JavaScript
const axios = require("axios");
/*
1- In Microsoft Teams, choose More options (⋯) next to the channel name and then choose Connectors.
2- Scroll through the list of Connectors to Incoming Webhook, and choose Add.
3- Enter a name for the webhook, upload an image to associate with data from the webhook, and choose Create.
4- Replace the webhook URL into this variable.
*/
const webhookURL = "https://outlook.office.com/webhook/XXXXX...XXXXX/IncomingWebhook/XXXXX...XXXXX";