Skip to content

Instantly share code, notes, and snippets.

View alexZajac's full-sized avatar
👀
Probably coding

Alexandre Zajac alexZajac

👀
Probably coding
View GitHub Profile

Requirements for Contributing a Bug Fix

  • Fill out the template below. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • The pull request must only fix an existing bug. To contribute other changes, you must use a different template.
  • The pull request must update the test suite to demonstrate the changed functionality.
  • After you create the pull request, all status checks must be pass before a maintainer reviews your contribution.

Identify the Bug

Link to the issue describing the bug that you're fixing.

Requirements for Adding, Changing, or Removing a Feature

  • Fill out the template below. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • The pull request must contribute a change that has been endorsed by the maintainer team. See details in the template below.
  • After you create the pull request, all status checks must be pass before a maintainer reviews your contribution.

Issue or RFC Endorsed by Atom's Maintainers

Link to the issue or RFC that your change relates to. This must be one of the following:

Requirements for Contributing a Performance Improvement

  • Fill out the template below. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • The pull request must only affect performance of existing functionality. To contribute other changes, you must use a different template.
  • After you create the pull request, all status checks must be pass before a maintainer reviews your contribution.

Description of the Change

We must be able to understand the design of your change from this description. If we can't get a good idea of what the code will be doing from the description here, the pull request may be closed at the maintainers' discretion. Keep in mind that the maintainer reviewing this PR may not be familiar with or have worked with the code here recently, so please walk us through the concepts.

@alexZajac
alexZajac / tricks.js
Created May 14, 2020 22:36
A small gist following the artcile on "hidden" useful JS features
// 1 - The + operator
const plus = () => {
// get timestamp in a shorthand syntax
console.log(+new Date());
// boolean to integer conversion
console.log(+true);
console.log(+false);
// scientific notation conversion
console.log(+"1e8");
console.log(+"1.6e-2");
from decorpy import check_types
@check_types(input=(str, int), output=(str, ))
def multiple_strings(base_str, times):
return base_str * times
print(multiple_strings("Hello", 5))
## Output :
from decorpy import debug
@debug
def factorial(n, acc=1):
if n < 2:
return acc
return factorial(n-1, n*acc)
f5 = factorial(5)
from decorpy import timer
@timer
def test(n):
sum = 0
for i in range(n):
sum += i
return sum
import * as React from "react";
import { View, StyleSheet, Dimensions } from "react-native";
import posed from "react-native-pose";
const { width, height } = Dimensions.get("window");
const items = new Array(7).fill({});
const OverView = posed.View({
open: {
export default class App extends React.Component {
constructor(props) {
super(props);
this._drawer = {};
this.state = {
isOpen: false
};
}
import * as React from 'react';
import { Text, View, StyleSheet, Dimensions } from 'react-native';
import CardItemUI from './CardItemUI';
import Constants from 'expo-constants';
const { width, height } = Dimensions.get('window');
// or any pure javascript modules available in npm
import { Card } from 'react-native-paper';
import { FlatGrid } from 'react-native-super-grid';
const OFFSET = 100;