Skip to content

Instantly share code, notes, and snippets.

View ue's full-sized avatar
🔫
the css mafia

Ugur ue

🔫
the css mafia
View GitHub Profile
import { Clipboard } from 'react-native';
const readFromClipboard = async () => {
const clipboardContent = await Clipboard.getString();
return clipboardContent;
};
const writeToClipboard = async (text) => {
await Clipboard.setString(text);
};
@ue
ue / gist:2c0075af2e521e7b429bbaddac0ab662
Last active July 27, 2018 08:29
dinamic state update
_handleStateUpdate(modal, show, quickDial) {
const updates = {
[modal]: show
}
this.setState(updates);
}
this._handleStateUpdate.bind(this, "stateName", true)
import React, { Component } from 'react';
import { Animated, Dimensions, ScrollView, StatusBar, View, TouchableOpacity } from 'react-native';
import { Icon } from '../../../components/hybritIcon';
import { MapView } from '../../../components/map';
import { PlaceListItem } from '../../../components/placeListItem';
import styles from './_styles';
const MAP_MAX_HEIGHT = Dimensions.get('window').height / 1.2;
import React, { Component } from 'react';
import PanelContentContainer from '../../panels/container/panelContentContainer';
const runningInElectron = ((typeof process !== 'undefined' ? true : false) && process.versions.electron);
export class CustomTabView extends Component {
constructor(props) {
super(props);
@ue
ue / utilities-store
Created May 22, 2018 13:16
utilities-store
import _ from "lodash";
import { createAction, handleActions } from 'redux-actions';
import reduceReducers from 'reduce-reducers';
import { isFSA } from 'flux-standard-action';
/**
* Given a mount point and a list of action types returns a mapping
* of those types to their derived namespaced type based on the mount point.
*
rm rf .git
$ git remote add origin https://github.com/username/new_repo
Your branch x commit ahead
git reset --hard origin/branch_name
See remote URL
git remote -v
app.on("ready", function() {
mainWindow = new BrowserWindow({width: 800, height: 600})
mainWindow.loadURL(url.format({
pathname: path.join(__dirname, 'index.html'),
protocol: 'file:',
slashes: true
}))
}
@ue
ue / gist:a1741e0d4d21137d57dcdcc3b2003176
Created November 3, 2017 19:32 — forked from AliMD/gist:3344523
All github Emoji (Smiles)

All github Emoji (Smiles)

ali.md/emoji

:bowtie: | 😄 | 😆 | 😊 | 😃 | ☺️ | 😏 | 😍 | 😘 | :kissing_face: | 😳 | 😌 | 😆 | 😁 | 😉 | :wink2: | 👅 | 😒 | 😅 | 😓

😩 | 😔 | 😞 | 😖 | 😨 | 😰 | 😣 | 😢 | 😭 | 😂 | 😲 | 😱 | :neckbeard: | 😫 | 😠 | 😡 | 😤 | 😪 | 😋 | 😷

😎 | 😵 | 👿 | 😈 | 😐 | 😶 | 😇 | 👽 | 💛 | 💙 | 💜 | ❤️ | 💚 | 💔 | 💓 | 💗 | 💕 | 💞 | 💘 | ✨

@ue
ue / gist:6e02fc8acecebec7ed0249746cffba30
Created October 31, 2017 13:58
electron.saveToFile
electron.saveToFile(logContent)
.then(( filePath ) => {
handleResponse();
}).catch((reason) => {
}).then(() => {
this._handleSaveToFileOpen();
});
@ue
ue / gist:63bf63a56b03699dccf866e55d977945
Created October 20, 2017 11:11
Find Location For Your City
https://developers.google.com/maps/documentation/javascript/examples/map-geolocation
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Reverse Geocoding</title>