Skip to content

Instantly share code, notes, and snippets.

View berat's full-sized avatar
🎯
All is well!

Berat Bozkurt berat

🎯
All is well!
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AdjustWindowForFontSizeChange</key>
<true/>
<key>AppleAntiAliasingThreshold</key>
<integer>1</integer>
<key>ApplePressAndHoldEnabled</key>
<false/>
arcticicestudio.nord-visual-studio-code
atomiks.moonlight
ChakrounAnas.turbo-console-log
CoenraadS.bracket-pair-colorizer
dbaeumer.vscode-eslint
dsznajder.es7-react-js-snippets
eamodio.gitlens
emmanuelbeziat.vscode-great-icons
esbenp.prettier-vscode
k-r.modified-darker-material-theme
@berat
berat / 1
Last active August 19, 2020 12:09
1. Kısım
<a href="#"><div className="phoneModel"><img src="http://15.188.33.108/assets/img/phone2.png" class="phone-img d-inline-block" /><div style={{position:"absolute",width:"324px",borderRadius:"32px",height:"693px",overflow:"hidden"}} id="videoWithJs">
<iframe width="324px" height="100%" src="https://www.youtube.com/embed/yTCsEWDQS2M" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div></div></a>
2. Kısım
app.use(cors())
var allowCrossDomain = function(req, res, next) {
res.header('Access-Control-Allow-Origin', '*')
res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE')
res.header(
'Access-Control-Allow-Headers',
'origin,x-requested-with, Content-Type, Authorization'
)
name: Node.js CI
on:
push:
branches: [ master ]
jobs:
deploy:
runs-on: [ubuntu-latest]
steps:
let arr = ["a", "b", "c", "d"];
let seconds = 1000
arr.forEach((item, index) => {setTimeout(() => {console.log(item)}, seconds); seconds += 1000;})
let arr = [1, 2, 3, 3, 4, 5, 6, 7, 7, 7];
const findDuplicates = (arr) => arr.filter(( item, index ) => arr.indexOf(item) != index);
console.log([...new Set(findDuplicates(arr))])
import React from 'react';
import {
SafeAreaView,
AsyncStorage,
ScrollView,
Dimensions,
BackHandler,
Alert,
StatusBar,
} from 'react-native';
const getData = async () => {
const response = await Axios.get(
`${config.apiURL}${config.version}users/${userid}`
)
if (response.data.status == 201) {
setLoad({ load: true, check: true })
setCheckUserID(response.data.userid)
} else {
setLoad({ load: true, check: false })
}
var whitelist = [
'https://site2.com',
'http://site1.com',
'http://0.0.0.0:3000'
]
var corsOptions = {
origin: function(origin, callback) {
var originIsWhitelisted = whitelist.indexOf(origin) !== -1
callback(null, originIsWhitelisted)