Skip to content

Instantly share code, notes, and snippets.

View arthurdenner's full-sized avatar
🤓
Always trying to improve my skills and knowledge to apply them everywhere.

Arthur Denner arthurdenner

🤓
Always trying to improve my skills and knowledge to apply them everywhere.
View GitHub Profile
@joshuabradley012
joshuabradley012 / Object collisions with canvas
Last active July 22, 2024 08:17
An example of 2D collisions using JavaScript Canvas
class State {
constructor(display, actors) {
this.display = display;
this.actors = actors;
}
update(time) {
/**
* provide an update ID to let actors update other actors only once
@swyxio
swyxio / readme.md
Last active January 16, 2022 10:36
svelte society day talks and resources -
@kenzieschmoll
kenzieschmoll / AndroidManifest.xml
Created December 17, 2018 16:17
maps sample - final AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.googlemapspluginexample">
<!-- The INTERNET permission is required for development. Specifically,
flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
@moshfeu
moshfeu / extension.js
Created September 22, 2018 22:02
Get current line content in vscode extension
const {text} = activeEditor.document.lineAt(activeEditor.selection.active.line);
@slightfoot
slightfoot / error_capture.dart
Last active April 26, 2021 12:03
Crash Reporting / Error Capture for Flutter
///
/// Flutter Captured Error Reporting
/// Created by Simon Lightfoot
///
/// Copyright (C) DevAngels Limited 2018
/// License: APACHE 2.0 - https://www.apache.org/licenses/LICENSE-2.0
///
import 'dart:async';
import 'dart:io';
import 'dart:ui' as ui show window;
@kitze
kitze / LongPress.js
Last active January 8, 2019 07:40
A LongPress component for React
import {React, Component} from 'react';
class LongPress extends Component {
shouldShortPress = true;
componentDidMount() {
this.listenForTouch();
}
componentWillUnmount() {
@atinux
atinux / async-foreach.js
Last active August 30, 2024 13:03
JavaScript: async/await with forEach()
const waitFor = (ms) => new Promise(r => setTimeout(r, ms))
const asyncForEach = async (array, callback) => {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array)
}
}
const start = async () => {
await asyncForEach([1, 2, 3], async (num) => {
await waitFor(50)
@coco-napky
coco-napky / hyper.js
Created March 8, 2017 23:21
Hyper config for git bash in Windows
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',
@0x1ad2
0x1ad2 / tabs.service.ts
Last active January 15, 2019 00:06
A service to hide and show tabs in Ionic 2
import {Injectable} from '@angular/core';
// Declare TabsService as a provider in app.module.ts
// Inject TabsService in your class: constructor(public tabs: TabsService){}
// Use the this.tabs.hide() or this.tabs.show() methods wherever you want
@Injectable()
export class TabsService {
constructor() {}
public hide() {
{
"UF": [
{"nome": "Acre", "sigla": "AC"},
{"nome": "Alagoas", "sigla": "AL"},
{"nome": "Amapá", "sigla": "AP"},
{"nome": "Amazonas", "sigla": "AM"},
{"nome": "Bahia", "sigla": "BA"},
{"nome": "Ceará", "sigla": "CE"},
{"nome": "Distrito Federal", "sigla": "DF"},
{"nome": "Espírito Santo", "sigla": "ES"},