Skip to content

Instantly share code, notes, and snippets.

View coelhucas's full-sized avatar
:shipit:

Lucas coelhucas

:shipit:
View GitHub Profile
this.fileTransfer.download('https://github.com/janpio/ionic-epubjs/raw/master/src/assets/books/moby-dick.epub', path + 'moby-dick.epub').then(entry => {
this.finishedDownload = true;
let url = entry.toURL();
this.current_book = new Book();
this.current_book.label = "Moby Dick (.epub)";
this.current_book.file = path + 'moby-dick.epub';
})
function parseString(string) {
const keyRegex = /(\w+\d+):/g;
const valRegex = /:(["']?)(\w+)(\\?.)*?\1/g;
const matchKeys = string.match(keyRegex);
const matchValues = string.match(valRegex);
let result = [];
for (let i = 0; i < matchKeys.length; i++) {
[100%] progress_finish(["progress_finish"], [])
[100%] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: modules/libmodules.osx.tools.64.a(btBroadphaseProxy.osx.tools.64.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: modules/libmodules.osx.tools.64.a(shape_owner_bullet.osx.tools.64.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: modules/libmodules.osx.tools.64.a(aria.osx.tools.64.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: modules/libmodules.osx.tools.64.a(cmac.osx.tools.64.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: modules/libmodules.osx.tools.64.a(ecjpake.osx.tools.64.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/b
{
"id": "b8b91bf7-6f92-4cab-8eb5-01a7e3ff398d",
"modelName": "GMProject",
"mvc": "1.0",
"IsDnDProject": false,
"configs": [
],
"option_ecma": false,
"parentProject": {
extents KinematicBody2D
var is_repelling: bool = false
[...]
func _process(delta):
if not is_repelling:
for i in get_slide_count():
{
"config":{
"url":"http://localhost:3000/api/v1.0/bff-plataforma/clientes",
"method":"post",
"data":"{\"nome\":\"lucas\",\"email\":\"lucas@a.co\",\"telefone\":\"(24) 99868-4321\",\"renda\":\"8.391.823,12\"}",
"headers":{
"Accept":"application/json, text/plain, */*",
"Content-Type":"application/json;charset=utf-8"
},
"baseURL":"http://localhost:3000/api",
{
"odata.metadata":"http://ott.online.meo.pt/Catalog/v7/$metadata#Channels",
"odata.count":"152",
"value":[
{
"Id":98910,
"Title":"11",
"IsAdult":false,
"InPromotion":false,
"PromotionDescription":null,
#!/usr/bin/env python3
#
# MIT License
#
# Copyright (c) 2020 Victor Gama de Oliveira <hey@vito.io>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@coelhucas
coelhucas / gipply.sh
Last active February 4, 2021 20:57
Gipply takes an URL to a diff and applies with a git apply. Helps to quickly customize dwm, for instance.
#!/bin/bash
url="$1"
# Check if received parameter
if [ -z "$url" ]
then
echo "URL to apply .diff must be supplied"
exit
fi
echo "Applying ${url}..."
@coelhucas
coelhucas / a11y_studies.js
Created September 28, 2021 21:00
Accessibility studies
// Use this: https://contrast-ratio.com/
/**
* Gets relative luminance from 8-bit RGB color
*/
function getRelativeLuminance(r8bit, g8bit, b8bit) {
const rsRGB = r8bit / 255;
const gsRGB = g8bit / 255;
const bsRGB = b8bit / 255;