Skip to content

Instantly share code, notes, and snippets.

View namuan's full-sized avatar
🎯
Focusing

namuan namuan

🎯
Focusing
View GitHub Profile
@namuan
namuan / script.js
Created February 16, 2024 07:51 — forked from luighifeodrippe/script.js
Download a JSON List of twitter bookmarks
/* Enhancements to the Twitter Scraping Script:
This update to the script introduces a more robust mechanism for extracting detailed interaction data from tweets as they are scraped from Twitter. Previously, the script focused on collecting basic content such as the tweet's text. Now, it has been augmented to include a comprehensive extraction of interaction metrics, including replies, reposts, likes, bookmarks, and views, for each tweet.
Key Changes:
1. Improved Data Extraction:
- The script now searches through all elements within a tweet that have an `aria-label` attribute, filtering for labels that contain key interaction terms (replies, reposts, likes, bookmarks, views). This ensures that only relevant `aria-labels` are considered for data extraction.
2. Flexible Interaction Data Parsing:
digraph architecture {
rankdir=LR;
// Storage - #303F9F (dark blue)
node[fillcolor="#303F9F" style="filled" fontcolor="white"];
database[label="DB"]; cache[label="Redis"];
// Client-side Apps - #FFEB3B (yellow)
node[fillcolor="#FFEB3B" style="filled" fontcolor="black"];
front_end[label="Front-end App"]; extension[label="Browser Extension"];
@namuan
namuan / presign_url.py
Created January 3, 2019 09:25 — forked from heitorlessa/presign_url.py
Quick and dirty S3 Presign URL using Python Boto3 and Click
import boto3
import click
@click.command()
@click.argument("bucket")
@click.argument("key")
@click.option("-e", "--expiration", default=3600, type=int, help="How long this presigned URL will live for")
def presign_s3(bucket, key, expiration):
""" Simple utility to generate presigned URL on S3 (Default 1 hour expiration)
@namuan
namuan / opsworks_blue_green_deploy_test_long_version
Created December 13, 2015 12:34 — forked from rhenning/opsworks_blue_green_deploy_test_long_version
AWS OpsWorks full-stack blue/green deploy test
$ aws opsworks describe-stacks
{
"Stacks": [
{
"ServiceRoleArn": "arn:aws:iam::047170177871:role/aws-opsworks-service-role",
"StackId": "575e1389-1df3-427d-99d3-d60f89a41442",
"DefaultRootDeviceType": "ebs",
"Name": "rhenning_test",
"ConfigurationManager": {
"Version": "11.4",
@namuan
namuan / build.gradle
Last active December 23, 2015 02:59 — forked from Dierk/build.gradle
apply plugin:'groovy'
apply plugin:'idea'
apply plugin:'application'
apply plugin: 'shadow'
buildscript {
repositories {
maven {
name 'Shadow'
url 'http://dl.bintray.com/content/johnrengelman/gradle-plugins'