Skip to content

Instantly share code, notes, and snippets.

View Fazzani's full-sized avatar

Fazzani Fazzani

View GitHub Profile
@Fazzani
Fazzani / drop_schema_sql_server.sql
Created October 1, 2020 12:45
Drop schema CASCADE (tables, view, sequences, functions, etc...)
IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'spDropSchema')
BEGIN
DROP PROCEDURE spDropSchema
END
GO
CREATE PROCEDURE spDropSchema(@Schema nvarchar(200))
AS
DECLARE @Sql NVARCHAR(MAX) = '';
@Fazzani
Fazzani / .gitconfig
Created April 19, 2020 22:53 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = [email protected]
username = pksunkara
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
@Fazzani
Fazzani / azuredevops-editorconfig.yaml
Created April 3, 2020 20:40 — forked from robinmanuelthiel/azuredevops-editorconfig.yaml
EditorConfig Check with Azure DevOps
pool:
vmImage: 'Ubuntu 16.04'
steps:
- bash: |
npm install -g eclint
eclint check $(git ls-files)
failOnStderr: true
displayName: 'Check EditorConfig violations'
@Fazzani
Fazzani / ns-inet.sh
Created December 22, 2019 22:36 — forked from dpino/ns-inet.sh
Setup a network namespace with Internet access
#!/usr/bin/env bash
# set -x
# Returns all available interfaces, except "lo" and "veth*".
available_interfaces()
{
local ifaces=(`ip li sh | cut -d " " -f 2`)
local ret=()
@Fazzani
Fazzani / NERDTree.mkd
Created December 21, 2019 08:38 — forked from m3nd3s/NERDTree.mkd
My Vim Cheat Sheet

NERDTree

o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|

O.......Recursively open the selected directory..................|NERDTree-O|

@Fazzani
Fazzani / index_picons.json
Last active May 18, 2020 23:08
picons index (json)
This file has been truncated, but you can view the full file.
{"echourouk": "https://raw.githubusercontent.com/Fazzani/epg/master/logosChannels/echourouk.png", "51bfbsradio": "https://raw.githubusercontent.com/Fazzani/epg/master/logosChannels/51bfbsradio.png", "cidadefm": "https://raw.githubusercontent.com/Fazzani/epg/master/logosChannels/cidadefm.png", "edenhd": "https://raw.githubusercontent.com/Fazzani/epg/master/logosChannels/edenhd.png", "viasatnaturehistory": "https://raw.githubusercontent.com/Fazzani/epg/master/logosChannels/viasatnaturehistory.png", "tbnespana": "https://raw.githubusercontent.com/Fazzani/epg/master/logosChannels/tbnespana.png", "tvcine2": "https://raw.githubusercontent.com/Fazzani/epg/master/logosChannels/tvcine2.png", "feelgoodmusic": "https://raw.githubusercontent.com/Fazzani/epg/master/logosChannels/feelgoodmusic.png", "abchannel": "https://raw.githubusercontent.com/Fazzani/epg/master/logosChannels/abchannel.png", "arthekayat": "https://raw.githubusercontent.com/Fazzani/epg/master/logosChannels/arthekayat.png", "disneyjuniorpremium": "https:/
@Fazzani
Fazzani / playlist1.m3u
Last active August 12, 2024 03:22
playlist.m3u (for testing)
#EXTM3U
#EXTINF:-1 tvg-ID="" tvg-name="*** SERVER DMTN-IPTV ***" tvg-logo="" group-title="TUNISIA TV",*** SERVER DMTN-IPTV ***
http://testurl-tv.net:8080/pas109QUd/ZMMo0YUDzM/11499
#EXTINF:-1 tvg-ID="" tvg-name="FI: TV 7 News Heaven" tvg-logo="" group-title="Finland",FI: TV 7 News Heaven
http://testurl-tv.net:8080/pas109QUd/ZMMo0YUDzM/55329
#EXTINF:-1 tvg-ID="" tvg-name="FI: TV7 Plus!" tvg-logo="" group-title="Finland",FI: TV7 Plus!
http://testurl-tv.net:8080/pas109QUd/ZMMo0YUDzM/31477
#EXTINF:-1 tvg-ID="" tvg-name="FI: Jim" tvg-logo="" group-title="Finland",FI: Jim
http://testurl-tv.net:8080/pas109QUd/ZMMo0YUDzM/26388
#EXTINF:-1 tvg-ID="" tvg-name="FI: LIV" tvg-logo="" group-title="Finland",FI: LIV
{
"user_info": {
"username": "mlqmdqsd",
"password": "ofQ5ys6qsdQ",
"auth": 1,
"status": "Active",
"exp_date": "1583056680",
"is_trial": "0",
"active_cons": "1",
"created_at": "1551434286",
@Fazzani
Fazzani / PowerShellTricks
Created February 18, 2019 14:50
dockerfile windows
# PowerShell Tricks
This is a collection of some PowerShell tricks, especially if you come from Unix bash.
## `set -e`
In bash I often want to **abort the script** if an exit code of a program is not zero or another error occurs. The bash equivalent to `set -e`
```powershell
$ErrorActionPreference = 'Stop'
```
@Fazzani
Fazzani / pptpd.sh
Created December 24, 2018 01:15
pptpd no internet access
nano /etc/sysctl.conf
# Add or find and comment out the following line
net.ipv4.ip_forward=1
# Save, close the file and run the following command to make the changes take effect.
sysctl -p
# The following iptables firewall rules allow port 1723, GRE and perform NAT
iptables -I INPUT -p tcp --dport 1723 -m state --state NEW -j ACCEPT