Skip to content

Instantly share code, notes, and snippets.

View samaddico's full-sized avatar
🏠
Working from home

Samuel Addico samaddico

🏠
Working from home
View GitHub Profile
@samaddico
samaddico / test_temp_directory.py
Created February 2, 2020 04:00 — forked from odyniec/test_temp_directory.py
An example Python unittest test case that creates a temporary directory before a test is run and removes it when it's done.
import shutil, tempfile
from os import path
import unittest
class TestExample(unittest.TestCase):
def setUp(self):
# Create a temporary directory
self.test_dir = tempfile.mkdtemp()
def tearDown(self):
@samaddico
samaddico / BankReader.java
Created October 22, 2019 11:14 — forked from ah052070/BankReader.java
Java program involving transactions
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
* Class which reads clients transactions from internet database file and returns for its consumers
*/
@samaddico
samaddico / BankReader.java
Created October 22, 2019 11:14 — forked from ah052070/BankReader.java
Java program involving transactions
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
* Class which reads clients transactions from internet database file and returns for its consumers
*/
@samaddico
samaddico / BankReader.java
Created October 22, 2019 11:13 — forked from ah052070/BankReader.java
Java program involving transactions
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
* Class which reads clients transactions from internet database file and returns for its consumers
*/
@samaddico
samaddico / BankReader.java
Created October 22, 2019 11:13 — forked from ah052070/BankReader.java
Java program involving transactions
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
* Class which reads clients transactions from internet database file and returns for its consumers
*/
@samaddico
samaddico / BankReader.java
Created October 22, 2019 11:13 — forked from ah052070/BankReader.java
Java program involving transactions
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
* Class which reads clients transactions from internet database file and returns for its consumers
*/
@samaddico
samaddico / BankReader.java
Created October 22, 2019 11:13 — forked from ah052070/BankReader.java
Java program involving transactions
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
* Class which reads clients transactions from internet database file and returns for its consumers
*/
@samaddico
samaddico / curl.md
Created October 4, 2019 18:26 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@samaddico
samaddico / OkHttpUtil.java
Created October 4, 2019 15:04 — forked from preethamhegdes/OkHttpUtil.java
OkHttp Client Ignore certificate
import okhttp3.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.net.ssl.*;
import java.net.*;
import java.security.cert.CertificateException;
/*
okhttp version used 3.8.1
@samaddico
samaddico / bitbucket-pipelines.yml
Created July 10, 2019 09:57 — forked from adilsoncarvalho/bitbucket-pipelines.yml
Bitbucket Pipelines deployment to a Google Container Engine configuration
options:
docker: true
pipelines:
branches:
master:
- step:
image: google/cloud-sdk:latest
name: Deploy to production
deployment: production
caches: