Skip to content

Instantly share code, notes, and snippets.

View vchrombie's full-sized avatar

Venu Vardhan Reddy Tekula vchrombie

View GitHub Profile
@adam-p
adam-p / Local PR test and merge.md
Last active February 5, 2024 19:39
Testing a pull request, then merging locally; and avoiding TOCTOU

It's not immediately obvious how to pull down the code for a PR and test it locally. But it's pretty easy. (This assumes you have a remote for the main repo named upstream.)

Getting the PR code

  1. Make note of the PR number. For example, Rod's latest is PR #37: Psiphon-Labs/psiphon-tunnel-core#37

  2. Fetch the PR's pseudo-branch (or bookmark or rev pointer whatever the word is), and give it a local branch name. Here we'll name it pr37:

$ git fetch upstream pull/37/head:pr37
@scriptnull
scriptnull / thirugram.js
Last active October 8, 2023 20:02
spam telegram via telegram web
//spam message the chats with thirugram.js
//open up telegram web and go to the chat you want to spam
//open console ( Ctrl + Shift + J )
//execute the code
var message = ""; //spam message
var interval = 1 ; // in seconds
var count = 10 ; //number of times to send
var notifyInterval = 5 ; //notify
var i = 0 ;
var timer = setInterval(function(){
@PurpleBooth
PurpleBooth / README-Template.md
Last active June 10, 2024 06:12
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@valeriocos
valeriocos / get-bearer-token-twitter-api
Created June 7, 2018 12:54
Get a bearer token for Twitter application-only requests in Python3
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015-2018 Bitergia
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
@vchrombie
vchrombie / README.md
Last active September 8, 2022 17:01
automation script to setup the GrimoireLab project 🦉 🚀

glab-dev-env-setup

While setting up the developer environment of the GrimoireLab, one step is to fork all the GrimoireLab components, clone them to a target local folder (e.g., sources) and each local repo should have two remotes: origin points to the forked repo, while upstream points to the parent repo.

Reference: Cloning the repositories

This script automates the whole process.

@valeriocos
valeriocos / get-oauth2-token-slack-api
Created April 4, 2020 07:41
Get a OAuth2 token for Slack app using requests in Python3
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015-2020 Bitergia
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
@animeshk08
animeshk08 / create_schema.py
Created April 11, 2020 08:49
Used to fetch the indexes of ElasticSearch and create a schema.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import time
import pandas as pd
import argparse
from elasticsearch import Elasticsearch
def create_schema(index, file_name=None):
@valeriocos
valeriocos / snippet.py
Created June 7, 2020 16:42
using counter to count emotions
import collections
def __get_reactions(self, item):
item_reactions = item.get('award_emoji_data', [])
if item_reactions:
reactions_counter = collections.Counter([reaction["name"] for reaction in item_reactions])
item_reactions = [{"type": reaction, "count": reactions_counter[reaction]} for reaction in reactions_counter]
return {"reactions": item_reactions}
@yashk2000
yashk2000 / report.md
Last active September 12, 2023 07:08
Google Summer of Code 2020: Work Report
@ria18405
ria18405 / SCMS.md
Last active October 19, 2020 17:09
Social Currency Metric System