Skip to content

Instantly share code, notes, and snippets.

View btk's full-sized avatar
🌳

Burak Tokak btk

🌳
View GitHub Profile
@nullenc0de
nullenc0de / params.txt
Created March 29, 2019 00:57
List of parameters for content discovery
0
1
11
12
13
14
15
16
17
2
@bvaughn
bvaughn / index.md
Last active May 4, 2024 11:25
How to use profiling in production mode for react-dom

React recently introduced an experimental profiler API. This page gives instructions on how to use this API in a production release of your app.

Table of Contents

Profiling in production

React DOM automatically supports profiling in development mode for v16.5+, but since profiling adds some small additional overhead it is opt-in for production mode. This gist explains how to opt-in.

@chrislaughlin
chrislaughlin / travis.md
Created March 31, 2018 16:20
Using Travis CI with Gatsby

First set out your build scripts In your package.json scripts and install the gh-pages npm module

"build": "gatsby build",
"test": "echo \"no test specified\" && exit 0",
"preDeploy": "gatsby build --prefix-paths",
"deploy": "npm run preDeploy && gh-pages -d public"

Connect Travis CI to your repo and in the repo settings add an enviroment var call GITHUB_TOKEN with the value of your github token from:

'use strict'
import { Dimensions } from 'react-native'
import React, {View, DeviceEventEmitter} from 'react-native'
class SomeScene extends React.Component {
constructor (props) {
super(props)
this.state = {
visibleHeight: Dimensions.get('window').height
}
}
@simevidas
simevidas / highlight_tweets.js
Last active July 12, 2017 17:42
A JS snippet for highlighting tweets with lots of RTs or hearts
(function(){
'use strict';
let cap = 100; // 100+ RTs or hearts produces max yellow bg color
$('.tweet', '.stream-items').each((i, tweet) => {
let all_nums = $(tweet)
.find('.ProfileTweet-actionList .ProfileTweet-actionCount:visible')
.map((j, elem) => Number(elem.textContent)).toArray();
@mertskaplan
mertskaplan / Ankara Üniversitesi OBS Anket Atlatıcı
Last active January 18, 2018 08:53
Ankara Üniversitesi Kampüs Bilgi Sistemi'nde (OBS) sınav sonuçlarını görebilmek için doldurulması zorunlu tutulan anketi es geçmeye yarayan JavaScript dili ile yazılmış koddur. Detaylar ve kullanım için: http://mertskaplan.com/teknoloji/ankara-universitesi-obs-icin-kucuk-kodlar
setTimeout(function () {$('input:radio[id=q_708]').click();}, 50);
setTimeout(function () {$('input:radio[id=q_722]').click();}, 50);
setTimeout(function () {$('input:radio[id=q_742]').click();}, 50);
setTimeout(function () {$('input:radio[id=q_746]').click();}, 50);
setTimeout(function () {$('input:radio[id=q_750]').click();}, 50);
setTimeout(function () {$('input:radio[id=q_752]').click();}, 50);
setTimeout(function () {$('input:radio[id=q_759]').click();}, 50);
setTimeout(function () {$('input:radio[id=q_765]').click();}, 50);
setTimeout(function () {$('input:radio[id=q_771]').click();}, 50);
setTimeout(function () {$('input:radio[id=q_777]').click();}, 50);
@greenido
greenido / notes-IndexedDB.html
Created September 23, 2012 09:37 — forked from cfjedimaster/gist:2499973
Simple indexedDB example that will work both in Chrome and FF
<!DOCTYPE html>
<head>
<script>
var db;
// until we won't need this prefix mess
var indexedDB = window.indexedDB || window.webkitIndexedDB
|| window.mozIndexedDB || window.msIndexedDB;
var IDBTransaction = window.IDBTransaction ||
window.webkitIDBTransaction;
@Zirak
Zirak / jhr.js
Created July 20, 2012 15:44
JSONHttpRequest
//this is a tiny helper method for making JSON Http Requests
//if you want a more comprehensive solution, write it yourself
//
//the callback function will receive two arguments: the response,
// parsed as JSON, and the xhr object used inside jhr, with an added
// responseJSON property (you can probably guess what it is)
//
//this always sends a POST request, and the data is always serialized to JSON
//
//returns the xhr object used