Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
All is well!

Berat Bozkurt berat

🎯
All is well!
View GitHub Profile
View com.googlecode.iterm2.plist
<?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/>
View extension
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
View 1
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
View gist:95bd3b0fd072c3b5287b51a74cf4092d
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'
)
View github actions
name: Node.js CI
on:
push:
branches: [ master ]
jobs:
deploy:
runs-on: [ubuntu-latest]
steps:
View async items
let arr = ["a", "b", "c", "d"];
let seconds = 1000
arr.forEach((item, index) => {setTimeout(() => {console.log(item)}, seconds); seconds += 1000;})
View find Duplicate item
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))])
View gist:9d3b9ad15e9433c89552c2bf3448866c
import React from 'react';
import {
SafeAreaView,
AsyncStorage,
ScrollView,
Dimensions,
BackHandler,
Alert,
StatusBar,
} from 'react-native';
View gist:e47bb0f58f027f02f36c4a500718c417
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 })
}
View gist:e0f72f8e5992053c0b1ed560f36f2988
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)