Skip to content

Instantly share code, notes, and snippets.

View soflane's full-sized avatar

Sofiane A. soflane

View GitHub Profile
@manuc66
manuc66 / SPA112_ovh_belgium_config
Last active October 9, 2021 15:32
SPA112 ovh belgium configuration instruction
Paramétrage de ligne sur le SPA112 :
- une fois sur l'interface du téléphone, cliquer sur
"voice" puis "line 1",
- passer les champs avec les valeurs suivantes :
=> line enable : yes
=> proxy : sip.ovh.be
=> use outbound proxy : yes
=> outbound proxy : sip.ovh.be:5962
=> register : 1800
@nachomezzadra
nachomezzadra / remote.xml
Last active October 21, 2018 09:13
XBMC remote.xml mapping for LG TV HDMI CEC (42LS5700-SB)
<keymap>
<global>
<remote>
<skipminus>XBMC.Action(reloadkeymaps)</skipminus>
<stop>XBMC.ActivateWindow(Home)</stop>
<blue>ContextMenu</blue>
</remote>
</global>
<home>
<remote>
@duggan
duggan / cast.py
Last active November 28, 2020 21:55
Using pychromecast to headlessly stream youtube videos
#!/usr/bin/env python
"""
Requires pychromecast.
Install with `pip install pychromecast`
usage: cast.py [-h] -d DEVICE -v VIDEO
Cast YouTube videos headlessly.
@lambda2
lambda2 / punchlines.json
Created June 25, 2016 13:23
A JSON file of punchline of various french artists
[
{
"content": "« Je suis venu comme un roi, je pars comme une légende. »",
"tags": [
"Ego Trip",
"Foot",
"Sport"
],
"author": "Zlatan Ibrahimović",
"album": "",
@isc30
isc30 / install.bash
Last active January 27, 2021 10:38
Raspberry Pi Install PHP7 + Nginx + MySQL + PhpMyAdmin (last versions)
#!/bin/bash
# Thanks to https://gist.github.com/Lewiscowles1986/ce14296e3f5222082dbaa088ca1954f7
if [ "$(whoami)" != "root" ]; then
echo "Run script as ROOT please. (sudo !!)"
exit
fi
echo "deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi" > /etc/apt/sources.list.d/stretch.list
echo "APT::Default-Release \"jessie\";" > /etc/apt/apt.conf.d/99-default-release
@beeman
beeman / remove-all-from-docker.sh
Created November 15, 2016 03:04
Remove all from Docker
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes
@halkyon
halkyon / cleanup-win10.ps1
Last active April 28, 2024 16:40
Cleanup Windows 10 Powershell script
##
## Windows 10 cleanup script.
## Remove dodgy tracking settings, unneeded services, all apps, and optional features that come with Windows 10. Make it more like Windows 7.
## NOTE: this was tested on Creators Update (1703) and Fall Creators Update (1709). Some of this may not work as expected on newer versions.
##
## Instructions
## 1. Run this script (under Powershell as Administrator):
## powershell -ExectionPolicy Bypass .\cleanup-win10.ps1
## 2. Let it run through, you may see a few errors, this is normal
## 3. Reboot
@hjbotha
hjbotha / free_ports.sh
Last active June 20, 2024 14:34
Free ports 80 and 443 on Synology NAS
#! /bin/bash
# NEWLY ADDED BACKUP FUNCTIONALITY IS NOT FULLY TESTED YET, USE WITH CARE, ESPECIALLY DELETION
# Developed for DSM 6 - 7.0.1. Not tested on other versions.
# Steps to install
# Save this script in one of your shares
# Edit it according to your requirements
# Backup /usr/syno/share/nginx/ as follows:
# # cd /usr/syno/share/
# # tar cvf ~/nginx.tar nginx
@techthoughts2
techthoughts2 / Send-TelegramTextMessage
Last active June 1, 2024 05:23
This PowerShell function will send a Telegram message via the Telegram Bot API. Specify your Bot token and chat ID and send text messages to the specified Telegram chat via PowerShell.
<#
.Synopsis
Sends Telegram text message via Bot API
.DESCRIPTION
Uses Telegram Bot API to send text message to specified Telegram chat. Several options can be specified to adjust message parameters.
.EXAMPLE
$bot = "#########:xxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx"
$chat = "-#########"
Send-TelegramTextMessage -BotToken $bot -ChatID $chat -Message "Hello"
.EXAMPLE
@pedrolamas
pedrolamas / docker-iptables-fix.sh
Created August 18, 2020 19:32
Script to fix Docker iptables on Synology NAS
#!/bin/bash
currentAttempt=0
totalAttempts=10
delay=15
while [ $currentAttempt -lt $totalAttempts ]
do
currentAttempt=$(( $currentAttempt + 1 ))
echo "Attempt $currentAttempt of $totalAttempts..."