Skip to content

Instantly share code, notes, and snippets.

@fanian
fanian / abap_mvc.txt
Last active September 27, 2023 11:26
ABAP MVC
*&---------------------------------------------------------------------*
*& Report YGDF_REPORT_MVC
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT YGDF_REPORT_MVC.
*&---------------------------------------------------------------------*
*& Report ZMM35BWART2MTYPE_MNT
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
report zmm35bwart2mtype_mnt.
@fanian
fanian / mikrotik 2 gateways and separate clients
Last active August 30, 2022 12:55
mikrotik 2 gateways and separate clients
How to add 2 gateways and seperate clients by Chupaka
/ip firewall mangle add chain=prerouting src-address=198.54.15.0/24 action=mark-routing new-routing-mark=r_178
/ip firewall mangle add chain=prerouting src-address=192.168.10.0/24 action=mark-routing new-routing-mark=r_178
/ip firewall mangle add chain=prerouting src-address=192.168.11.0/24 action=mark-routing new-routing-mark=r_172
/ip firewall mangle add chain=prerouting src-address=192.168.12.0/24 action=mark-routing new-routing-mark=r_172
/ip route add gateway=178.242.0.200 routing-mark=r_178
/ip route add gateway=172.16.0.200 routing-mark=r_172
@fanian
fanian / continuesAltGroupsInBOM.py
Last active December 19, 2021 13:44
continues alternative groups in BOM
import pandas as pd
# Create DataFrame
df = pd.read_csv('data.csv')
jnum = 1
#loop through each row of dataframe (not including the first/zeroeth)
df['Global group'].loc[0] = jnum
for i in range(1,len(df)):
if df.BOM.loc[i] == df.BOM.loc[i-1] and df['Group'].loc[i] == df['Group'].loc[i-1]:
df['Global group'].loc[i] = jnum
@fanian
fanian / Sync gh-pages + master branches
Created February 11, 2019 07:31 — forked from mandiwise/Sync gh-pages + master branches
Keep gh-pages up to date with a master branch
// Reference: http://lea.verou.me/2011/10/easily-keep-gh-pages-in-sync-with-master/
$ git add .
$ git status // to see what changes are going to be commited
$ git commit -m 'Some descriptive commit message'
$ git push origin master
$ git checkout gh-pages // go to the gh-pages branch
$ git rebase master // bring gh-pages up to date with master
$ git push origin gh-pages // commit the changes
@fanian
fanian / bootstrap carousel height
Created November 25, 2014 19:29
Normalize Carousel Heights - pass in Bootstrap Carousel items
@fanian
fanian / taxiCalculator.py
Created November 30, 2017 06:51
POST from python and nested loop
import requests, json
open('output.txt', 'w').close()
with open('towns.txt') as f:
lines = f.readlines()
length = len(lines)
i = 0
while i < length:
for j in range(i, length):
begin = lines[i].strip('\n')
end = lines[j].strip('\n')
@fanian
fanian / remove_crw.cmd
Last active March 22, 2016 11:09 — forked from xvitaly/remove_crw.cmd
Remove telemetry updates for Windows 7 and 8.1
@ECHO OFF
REM #
REM # [EN] Remove telemetry updates for Windows 7 and 8.1
REM #
REM # Sources :
REM # https://gist.github.com/xvitaly/eafa75ed2cb79b3bd4e9#file-remove_crw-cmd
REM #
echo Uninstalling KB3075249 (telemetry for Win7/8.1)
start /w wusa.exe /uninstall /kb:3075249 /quiet /norestart
echo Uninstalling KB3080149 (telemetry for Win7/8.1)
@fanian
fanian / cycleSliderItemCss
Created October 2, 2014 10:31
add css class to cycle slider item, when clicking
//add css class to cycle slider item, when clicking
jQuery(document).ready(function($){
$('.slider .cycle-slide').click(function(){
var index = $('.slider').data('cycle.API').getSlideIndex(this);
$('.cycle-slide-active').removeClass('cycle-slide-active');
$(this).addClass('cycle-slide-active');
});
});
function counter() {
var stepCount = 20;
var time = 2000;
var stepTime = time / stepCount;
var count1 = $('#count_1').text();
var count2 = $('#count_2').text();
var count3 = $('#count_3').text();
var count4 = $('#count_4').text();
var count5 = $('#count_5').text();