Skip to content

Instantly share code, notes, and snippets.

View ahmetozalp's full-sized avatar
💾
Unknow

Ahmet ahmetozalp

💾
Unknow
View GitHub Profile
@furkancelik
furkancelik / ListItem.js
Last active January 28, 2019 14:48
React Native Animation Menu
import React, { Component } from "react";
import { Dimensions, Animated, Text, View } from "react-native";
const { height, width } = Dimensions.get("window");
export default class ListItem extends Component {
constructor(props) {
super(props);
this.show = new Animated.Value(0);
}
componentDidMount() {
/* @flow */
import React, { PureComponent } from 'react';
import { TouchableHighlight, Image, Dimensions } from 'react-native';
const { width }: { width: number } = Dimensions.get('window');
type node = { node: { image: { uri: string } } };
type State = {};
type Props = {
item: node,
/* @flow */
import React, { Component } from 'react';
import {
TouchableOpacity,
Image,
View,
Text,
StatusBar,
ScrollView,
Dimensions,
@ozcanzaferayan
ozcanzaferayan / App.tsx
Last active September 21, 2020 14:18
React Native WebRTC remoteStream example
import React, {useState} from 'react';
import {SafeAreaView, StyleSheet, View, Button} from 'react-native';
import {
RTCView,
mediaDevices,
MediaStream,
MediaStreamConstraints,
RTCPeerConnection,
} from 'react-native-webrtc';
@timruffles
timruffles / attack.md
Last active November 21, 2020 17:35
Chrome/Gmail attack received 11/03/2016. Not sure if the Chrome meta refresh + data:text,html technique is novel.

The following attack will display a "you've been signed out" page for GMail, and attempt to steal your account credentials.

DO NOT PUT ANY ACCOUNT CREDENTIALS INTO ANY TABS CREATED AFTER VISITING THESE LINKS :)

I received an email in my GMail inbox with a fake attachment image, styled to look like the real GMail attachment UI:

fake

This linked to a page that ended up displaying a fake "you've been signed out" link, via the data:text/html... URL feature of Chrome:

@Jpoliachik
Jpoliachik / index.ios.js
Last active August 17, 2021 10:27
ReactNative LayoutAnimation Example
'use strict';
import React, {
AppRegistry,
Component,
StyleSheet,
Text,
View,
TouchableOpacity,
LayoutAnimation,
} from 'react-native';
@pseudosavant
pseudosavant / createImageBitmap.js
Last active March 20, 2022 12:30 — forked from MonsieurV/createImageBitmap.js
createImageBitmap polyfill with support for CanvasImageSource (img, video, canvas) sources, Blobs, and ImageData. https://createimagebitmap-polyfill.glitch.me/
/*
* Polyfill for createImageBitmap
* https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/createImageBitmap
*
* Supports CanvasImageSource (img, video, canvas) sources, Blobs, and ImageData.
*
* From:
* - https://dev.to/nektro/createimagebitmap-polyfill-for-safari-and-edge-228
* - https://gist.github.com/MonsieurV/fb640c29084c171b4444184858a91bc7
* Updated by:
@AntoniusGolly
AntoniusGolly / index.js
Created March 18, 2018 17:17
Sample Node.js script for resizing images with the Sharp library
'use strict';
const AWS = require('aws-sdk');
const S3 = new AWS.S3({
signatureVersion: 'v4',
});
const sharp = require('sharp');
const BUCKET = process.env.BUCKET ? process.env.BUCKET : "mybucket";
const URL = process.env.URL ? process.env.URL : "http://localhost:5858"; // for local development
@barnybug
barnybug / docker-compose.yml
Created November 21, 2017 11:14
Docker compose for a Docker-in-docker gitlab runners setup
# Docker-in-Docker Gitlab runners setup taken from:
# https://medium.com/@tonywooster/docker-in-docker-in-gitlab-runners-220caeb708ca
dind:
restart: always
privileged: true
volumes:
- /var/lib/docker
image: docker:17.09.0-ce-dind
command:
- --storage-driver=overlay2
@jacks205
jacks205 / RNMultipleTargetsInstructions.md
Last active February 6, 2024 19:30
Settings up multiple app targets in React-Native