Skip to content

Instantly share code, notes, and snippets.

View ulises-jeremias's full-sized avatar
:octocat:

Ulises Jeremias ulises-jeremias

:octocat:
View GitHub Profile
@ulises-jeremias
ulises-jeremias / license-badges.md
Created February 24, 2017 14:36 — forked from lukas-h/license-badges.md
License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file. Easily copy and paste the code under the badges into your Markdown files.

Notes

  • Badges are made with Shields.io.
  • This badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Want to add a License?

Comment this gist or write me an E-Mail ([email protected])

@ulises-jeremias
ulises-jeremias / hot-reload.js
Last active June 4, 2018 23:31
Web Extension Hot Reloader
const filesInDirectory = dir => new Promise(resolve =>
dir.createReader().readEntries(entries =>
Promise.all(entries.filter(e => e.name[0] !== '.').map(e =>
e.isDirectory ?
filesInDirectory(e) :
new Promise(resolve => e.file(resolve))
))
.then(files => [].concat(...files))
.then(resolve)
)
@ulises-jeremias
ulises-jeremias / ReactToPrint.jsx
Last active June 22, 2020 03:10
React to Print
import React, { Component } from 'react'
import { findDOMNode } from 'react-dom'
import PropTypes from 'prop-types'
class ReactToPrint extends Component {
constructor(props) {
super(props)
const { content, on } = this.props
@ulises-jeremias
ulises-jeremias / ResponsivePie.jsx
Last active June 22, 2020 03:19
Responsive Pie implementation using semantic ui react and recharts
import React from 'react'
import PropTypes from 'prop-types'
import {
Responsive,
} from 'semantic-ui-react'
import {
PieChart,
Pie,
ResponsiveContainer,
Sector,
@ulises-jeremias
ulises-jeremias / auth-hook.js
Last active June 10, 2024 15:40
Examples of hooks utils using axios, recoil.js, keycloak-js, @react-keycloak/web and more.
import { useCallback, useEffect, useState } from 'react';
import { useSetRecoilState } from 'recoil';
import { useKeycloak } from '@react-keycloak/web';
import { commonNotification } from './common';
/**
* Returns the auth info and some auth strategies.
*
*/
@ulises-jeremias
ulises-jeremias / date.js
Created June 22, 2020 03:42
Date utils using lodash
import _ from 'lodash';
export const dateFormat = (date) => {
const dateStr = String(date || '');
if (!dateStr) {
return dateStr;
}
return String(dateStr.slice(0, 10) || '')
@ulises-jeremias
ulises-jeremias / date.js
Created June 22, 2020 03:42
Date utils using lodash
import _ from 'lodash';
export const dateFormat = (date) => {
const dateStr = String(date || '');
if (!dateStr) {
return dateStr;
}
return String(dateStr.slice(0, 10) || '')
@ulises-jeremias
ulises-jeremias / AppRoutes.jsx
Last active June 22, 2020 03:54
Props and PrivateRoute implementation using react-document-title, auth-hook ~> https://gist.github.com/ulises-jeremias/a27b85e3eea083278188f24de955989b
import React from 'react';
import { Switch, Redirect } from 'react-router-dom';
import { PropsRoute as Route } from './PropsRoute';
import { PrivateRoute } from './PrivateRoute';
import { Landing, PrivatePage } from '...';
const AppRoutes = (props) => (
<Switch>
{/* pages */}
<Route exact path="/" component={Landing} {...props} />
@ulises-jeremias
ulises-jeremias / ci.yml
Created May 23, 2022 04:36 — forked from mhart/ci.yml
GitHub Actions running 5 tslint jobs in parallel (each tests every 5th file)
name: CI
on: [push]
jobs:
tslint:
runs-on: ubuntu-latest
strategy:
matrix:
job: [0, 1, 2, 3, 4]
@ulises-jeremias
ulises-jeremias / WormsWMD-Archlinux.md
Created January 21, 2023 00:59 — forked from sxiii/WormsWMD-Archlinux.md
How to fix Worms W.M.D. launch on ArchLinux, Manjaro, Garuda, Artix Linux & Linux Mint

Game information Worms W.M.D.

Distribution name and version where applicable Manjaro 20.1.1 (Mikah)

Problem description Worms doesn't launch out of the box without two small tweaks. When launching Worms W.M.D. in Manjaro and Archlinux, you need to do two things:

  1. Install this apps: sudo pacman -S libcurl-gnutls libidn11 qt5-base qt5-xcb-private-headers(If you are on any other distro then Arch, you can skip this step. At least this is reported to be OK to skip for Linux Mint)