Skip to content

Instantly share code, notes, and snippets.

View marleyiam's full-sized avatar

marley ferreira marleyiam

  • Basis
  • Brasília/DF
View GitHub Profile
@marleyiam
marleyiam / safari_website_push.html
Created February 20, 2023 06:38 — forked from okiess/safari_website_push.html
App Service Backend - Safari Push Notification Setup
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Safari Website Push</title>
<script src="https://service.apphoshies.com/javascripts/jquery.js" type="text/javascript"></script>
<script src="https://service.apphoshies.com/javascripts/apphoshies.js" type="text/javascript"></script>
<!-- https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/NotificationProgrammingGuideForWebsites/PushNotifications/PushNotifications.html#//apple_ref/doc/uid/TP40013225-CH3-SW7 -->
@marleyiam
marleyiam / app.py
Created December 12, 2022 05:57 — forked from mattupstate/app.py
Flask application configuration using an environment variable and YAML
os
from flask_extended import Flask
app = Flask(__name__)
app.config.from_yaml(os.join(app.root_path, 'config.yml'))

DOCKER

list images with size

docker images | awk '{print $1"\t"$2"\t"$7" "$8}'

list running containers

docker ps
@marleyiam
marleyiam / index.html
Created February 22, 2021 19:18 — forked from shiawuen/index.html
Sample to upload file by chunk
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>test upload by chunk</title>
</head>
<body>
<input type="file" id="f" />
<script src="script.js"></script>
@marleyiam
marleyiam / .bashrc
Created February 11, 2021 19:22 — forked from Nilpo/.bashrc
Adds colored bash prompt, Git completion, and git branch name in the bash prompt.
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
@marleyiam
marleyiam / gist:eaaea65b1963df633c93b958d3a7a883
Created February 11, 2021 18:53 — forked from nmfisher/gist:99da9741c440cd460129
Custom AuthenticationHandler for CAS using Bcrypt (standard password encoding algorithm used by Grails spring security plugin)
package com.clearframe.cas;
import java.security.GeneralSecurityException;
import java.util.Map;
import javax.security.auth.login.FailedLoginException;
import javax.validation.constraints.NotNull;
import org.jasig.cas.adaptors.jdbc.AbstractJdbcUsernamePasswordAuthenticationHandler;
import org.jasig.cas.authentication.UsernamePasswordCredential;
import org.jasig.cas.authentication.HandlerResult;
import org.jasig.cas.authentication.PreventedException;
@marleyiam
marleyiam / sonarqube-docker-compose.yml
Created February 27, 2020 17:34 — forked from Warchant/sonarqube-docker-compose.yml
docker-compose file to setup production-ready sonarqube
version: "3"
services:
sonarqube:
image: sonarqube
expose:
- 9000
ports:
- "127.0.0.1:9000:9000"
networks:
@marleyiam
marleyiam / ca.md
Created February 17, 2020 14:11 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

downloadService.post('hudson.tools.JDKInstaller',{
"data": [
{
"name": "JDK 8",
"releases": [ {
"files": [
{
"filepath": "http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-linux-i586.tar.gz",
"name": "jdk-8u5-linux-i586.tar.gz",
"title": "Linux x86"
- Inexplicable perversity of human nature.
- The clever machinations of MongoDB's marketing people.
- The AGPL license killed it.
- We spent too long development before monetizing.
- Bad performance.
- Numeric types limited to a 64-bit `float`.
- Great product, but didn't/couldn't translate to revenue.
- Bad business model.
- Failure in timezones/timestamp nuances.