Skip to content

Instantly share code, notes, and snippets.

View romaad's full-sized avatar
👀
looking 4 open source projects

Mohamed Said romaad

👀
looking 4 open source projects
View GitHub Profile
@romaad
romaad / paypal.js
Created July 29, 2020 23:09
Paypal gettoken with axios
const SANDBOX_URL = "https://api.sandbox.paypal.com";
export class PayPalInterface {
async getToken() {
if (!this._token ||
this._token.expires_in + this._token.created >= new Date().getTime()) {
const url = SANDBOX_URL + '/v1/oauth2/token'
const headers = {
'Accept': 'application/json',
'Accept-Language': 'en_US',
from __future__ import print_function
import twitter
#delete tweets that follow a known pattern
#requires python-twitter
CONSUMER_KEY = 'NOPE'
CONSUMER_SECRET = 'NOPE'
ACCESS_TOKEN = 'NOPE'
ACCESS_TOKEN_SECRET = 'NOPE'
#gety your keys following this tutorial : https://python-twitter.readthedocs.io/en/latest/getting_started.html
#!/bin/bash
#program that decrypts and encrypts a file using des3
#encrypts a file and save it
if [ "$1" = "-e" ]; then
openssl des3 < $2 > $2.des3
fi
#encrypts a file and erase the original
if [ "$1" = "-ee" ]; then