Skip to content

Instantly share code, notes, and snippets.

View danialkalbasi's full-sized avatar
💯

Danial Kalbasi danialkalbasi

💯
View GitHub Profile
@danialkalbasi
danialkalbasi / variables-with-es5.js
Created May 26, 2020 20:02
Render Variables in es5
function render(html, variables) {
let htmlData = html;
Object.getOwnPropertyNames(variables).forEach((prop) => {
htmlData = htmlData.replace("$" + prop, variables[prop]);
});
return htmlData;
}
@danialkalbasi
danialkalbasi / PowerTranslatorDemo.js
Last active October 27, 2020 07:01
Power Translator Demo
import React, { Component } from 'react';
import { PowerTranslator, ProviderTypes, TranslatorConfiguration } from 'react-native-power-translator';
import { View, ScrollView, TouchableOpacity, Text } from 'react-native';
export default class PowerTranslatorDemo extends Component {
constructor() {
super();
this.state = { languageCode: 'fr' };
}
@danialkalbasi
danialkalbasi / Button.js
Last active September 10, 2017 13:24
React Native Unit Testing
import React, {Component} from 'react';
import {View, Text, TouchableOpacity} from 'react-native';
import styles from './button.style';
import StyleConstants from '@common/StyleConstants';
import * as Progress from 'react-native-progress';
import PropTypes from 'prop-types';
export default class Button extends React.Component {
static defaultProps = {
isRound: true,
var gsap = require('gsap')
export default class Animation{
let tl = new gsap.TimelineLite();
}
@danialkalbasi
danialkalbasi / terminal
Last active March 1, 2017 16:58
git rebase and reset
/*
** When you fix all the issues based on the comment, do a rebase
*/
git rebase master
/*
** Now copy the files that you changed and keep the copy somewhere.
** Open your Terminal and find the git commit that you want to reset to (most probably it's your first commit)
*/