Skip to content

Instantly share code, notes, and snippets.

View ohidurbappy's full-sized avatar
🌻
GREETINGS!

Ohidur Rahman Bappy ohidurbappy

🌻
GREETINGS!
View GitHub Profile
@ohidurbappy
ohidurbappy / Github Webhook Tutorial.md
Created August 4, 2020 16:02 — forked from jagrosh/Github Webhook Tutorial.md
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
You need to create a workflow yaml, doc here: https://help.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#creating-a-workflow-file 7
In the yaml, set ‘schedule’ event. Details here 7. code sample as below:
name: py
on:
schedule:
- cron: “0 0 * * *” #runs at 00:00 UTC everyday
var ss = SpreadsheetApp.openByUrl("Your Spread Sheet URL");
var sheet = ss.getSheetByName('Items'); // be very careful ... it is the sheet name .. so it should match
function doPost(e){
var action = e.parameter.action;
if(action == 'addItem'){
return addItem(e);
@ohidurbappy
ohidurbappy / README.md
Created June 9, 2020 17:34 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@ohidurbappy
ohidurbappy / google_translate_api.py
Created March 30, 2020 04:19
Google Translate API with python
from googletrans import Translator
translator = Translator()
# use this code for local translator service
# translator = Translator(service_urls=[
# 'translate.google.com',
# 'translate.google.co.kr',
# ])
# open the file 'google_translate_input.txt' and read line by line
from GoogleNews import GoogleNews
googlenews = GoogleNews()
# googlenews = GoogleNews('en','d')
q=input("Input a keyword to Search: ")
googlenews.search(q)
googlenews.getpage(1)
# googlenews.gettext()
# googlenews.getlinks()
@ohidurbappy
ohidurbappy / views-count.py
Created March 25, 2020 05:31
Youtube Playlist views count
'''
File name: program.py
Author: Ohidur Rahman Bappy
Author Website: https://ohidur.com
Author Email: ohidurbappy@gmail.com
Date created: 19/03/2020
Date last modified: 19/03/2020
Python Version: 3.8.1
'''
@ohidurbappy
ohidurbappy / gradient-deg-v2.markdown
Created November 23, 2018 22:01
Gradient [deg] v2
@ohidurbappy
ohidurbappy / SCSS.md
Created November 11, 2018 22:20 — forked from jareware/SCSS.md
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso