Skip to content

Instantly share code, notes, and snippets.

@shashankvemuri
shashankvemuri / imports.py
Last active January 4, 2024 05:28
Import these dependencies and set the variables
# Imports
from pandas_datareader import data as pdr
from pandas import ExcelWriter
import yfinance as yf
import pandas as pd
import datetime
import time
import requests
yf.pdr_override()
@akaron
akaron / geth_rpc_server.md
Last active August 9, 2022 14:16
create private geth rpc server using ssh port forwarding

note: create private geth rpc server using ssh port forwarding

In short, user provide ssh key to rpc server manager. Once the manager configured, then everytime the user need to type folowing commands to access to the geth rpc server:

  1. ssh -N -L 9545:localhost:8545 geth@machine_A_addr
  2. ... and set the rpc to http://localhost:9545

For convenienve, in the following I use these abbreviations:

  • machine A: run geth full node with RPC server
  • machine B: using the geth RPC from machine A
@XLNCs
XLNCs / AdobeFixAMD
Last active February 17, 2025 21:51
To fix adobe products crashes on AMD hackintosh
MOVED HERE:
https://gist.github.com/naveenkrdy/26760ac5135deed6d0bb8902f6ceb6bd
@tkrotoff
tkrotoff / FrontendFrameworksPopularity.md
Last active April 9, 2025 13:42
Front-end frameworks popularity (React, Vue, Angular and Svelte)
@Pross
Pross / sendy.php
Created April 26, 2016 19:14
Add to mu-plugins folder, auto add every new user to a sendy list. Works with default WordPress and Woocommerce registrations.
<?php
add_action( 'user_register', 'add_user_to_sendy_list' );
function add_user_to_sendy_list( $user_id ) {
$list = 'SENDY_LIST_ID';
$url = 'http://SENDY_INSTALL_URL/subscribe';
$user = get_userdata( $user_id );
$email = $user->data->user_email;
$name = $user->data->user_nicename;
@abhishekluv
abhishekluv / Sendy Subscribe Form Code.html
Created December 21, 2015 02:22
Sendy Subscribe Form Code
<form action="http://example.com/subscribe" method="POST" accept-charset="utf-8">
<input class="form-control input-lg" type="text" name="name" required id="name" placeholder="Name"/>
<br/>
<input class="form-control input-lg" type="email" name="email" required id="email" placeholder="Email" pattern="[a-zA-Z0-9._\-]+@[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,4}"/>
<br/>
<input class="form-control input-lg" type="tel" name="MobilePhone" required id="MobilePhone" placeholder="Phone"/>
</p>
<p>
<input class="form-control input-lg" type="text" name="WorkshopDate" id="WorkshopDate" placeholder="Click Here To Select a Sunday. (Date Format : Date/Month/Year)" required readonly="true"/>
<br/>
@ridem
ridem / -Shopify-Sendy.md
Last active November 18, 2023 21:41
Synchronize Shopify customers with Sendy

Synchronize Shopify customers with Sendy subscribers

Sendy woudln't be the Mailchimp killer without a proper Shopify integration. There we go, thanks to the Shopify gem and some ActiveRecord awesomeness.

NB: The script always keep in sync Shopify's accepts_marketing field with Sendy's unsubscribed field. I added custom fields like country and order count as an example of what we can do with it.

Installation

First make sure that you have the right ruby install (with rbenv for instance), with the right gems installed (like activerecord, shopify_api, etc) and the right mysql packages for the activerecord adapter;

@Wysie
Wysie / gist:03934b6a79a715772abd
Last active January 7, 2025 21:32
Upload to Amazon S3 Instead of Server for Sendy Email Image Uploads
//Using S3.php from https://github.com/tpyo/amazon-s3-php-class. Place it in includes/helpers
//Replaces Sendy's includes/create/upload.php
<?php
include('../functions.php');
include('../login/auth.php');
require_once('../helpers/S3.php');
//Init
$file = $_FILES['file']['tmp_name'];
@abtrout
abtrout / pass.md
Created July 8, 2014 14:51
Using password-store with git repository synching

Password-store keeps your passwords (or any other sensitive information) saved in GnuPG encrypted files organized in ~/.password-store. For more information about GPG, consult the GNU Privacy Handbook.

Getting started

To get started, install pass and generate a keypair.

$ brew install pass
$ gpg --gen-key
$ gpg --list-keys