Skip to content

Instantly share code, notes, and snippets.

@YoSoyPhil
YoSoyPhil / README.md
Last active March 11, 2026 21:59
Install Canon EOS Utility 2 full version

How to install Canon EOS Utility 2 full version

EOS Utility 2.14.20a full version install

Go to Canon and select your camera model under software downloads. At the time this guide was written, the link was https://www.canon-europe.com/support/consumer_products/software/eos-utility.html

Select your camera and download "EOS Utility 2.14.20a Updater for Windows" (yes, we will do full install with this file).

Before we can run the installer we need to add a key to our registry.

@julioxavierr
julioxavierr / useExpoResources.js
Last active February 27, 2020 13:03
React hook to abstract loading resources from expo and showing splash screen until completion
import { useEffect, useState } from 'react';
import * as Font from 'expo-font';
import { SplashScreen } from 'expo';
/**
* Load and use resources that need to be loaded async by Expo SDK
*/
const useExpoResources = () => {
const [isLoading, setIsLoading] = useState(true);
@rivaldorodrigues
rivaldorodrigues / data-util.ts
Created October 15, 2019 20:15
Utility class for date manipulation with Luxon
import { DateTime } from 'luxon';
export enum FORMATO {
DATA_HORA_PADRAO = 'dd/MM/yyyy HH:mm',
DATA_HORA_PADRAO_2 = 'dd/MM/yyyy HH:mm:ss',
DATA_HORA_ZONA_URL_1 = 'yyyy-MM-dd\'T\'HH:mm:ss',
DATA_HORA_ZONA_URL_2 = 'yyyy-MM-dd\'T\'HH:mm:ssZ',
DATA_HORA_ZONA_URL_3 = 'yyyy-MM-dd\'T\'HH:mm:ss.S',
DATA_HORA_ZONA_URL_4 = 'yyyy-MM-dd\'T\'HH:mm:ss.SZ',
DATA_HORA_URL_1 = 'YYYY-MM-DD HH:mm:ss',
@mayank23
mayank23 / README.md
Last active October 25, 2024 13:57
Jest Mock Any Property on Window Utility - with automatic cleanup

Jest Mock Any Property on Window Utility - with automatic cleanup.

@sibelius
sibelius / usage.tsx
Last active March 8, 2019 17:20
useSelectRows is a hook that manage a list of selected items, so you don't have to
const MyUserSelectableList = ({ users ) => {
const { onRowCheck, isRowSelected } = useSelectedRows();
return (
<>
{users.map(user => (
<>
<Checkbox value={isRowSelected(user)} onChange={(value) => onRowCheck(user, value)} />
<span>{user.name}</span>
</>
@antoniopresto
antoniopresto / Form.js
Last active November 30, 2019 14:04
Antd Masked Input
import { Form } from 'antd'
import { FormInput } from './antd-masked-input'
export default () => (
<Form>
<FormInput
form={this.props.form} // antd form
mask={'111.111.111-11'}
placeholder=""
label={''}
@superjose
superjose / .gitlab-ci.yml
Last active July 24, 2025 23:21
This is an example of a .gitlab-ci.yml that is required for Continuous Integration on GitLab projects.
# Reference: https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/
# GitLab uses docker in the background, so we need to specify the
# image versions. This is useful because we're freely to use
# multiple node versions to work with it. They come from the docker
# repo.
# Uses NodeJS V 9.4.0
image: node:9.4.0
# And to cache them as well.
@cecilemuller
cecilemuller / launch.json
Last active April 4, 2025 13:08
Run ts-node in VSCode Debugger
{
"version": "0.2.0",
"configurations": [
{
"name": "Example",
"type": "node",
"request": "launch",
"runtimeExecutable": "node",
"runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"],
@binki
binki / post-file.js
Last active October 4, 2023 14:35
posting a file loaded through fs.readFile() through axios+form-data
#!/usr/bin/env node
const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');
const filePath = __dirname + '/../accept-http-post-file/cookie.jpg';
fs.readFile(filePath, (err, imageData) => {
if (err) {
throw err;
}
@soulmachine
soulmachine / jwt-expiration.md
Last active June 19, 2025 15:38
How to deal with JWT expiration?

First of all, please note that token expiration and revoking are two different things.

  1. Expiration only happens for web apps, not for native mobile apps, because native apps never expire.
  2. Revoking only happens when (1) uses click the logout button on the website or native Apps;(2) users reset their passwords; (3) users revoke their tokens explicitly in the administration panel.

1. How to hadle JWT expiration

A JWT token that never expires is dangerous if the token is stolen then someone can always access the user's data.

Quoted from JWT RFC: