This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const http = require('http'); | |
const url = 'https://tenta.me/XXXXXX'; | |
const options = { | |
method: 'POST', | |
headers: { | |
"Content-Type": "application/json; charset=utf-8" | |
}}; | |
const request = http.request(url, options, (response) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const tmi = require("tmi.js"); | |
const options = { | |
options: { | |
debug: true, | |
}, | |
connection: { | |
cluster: "aws", | |
reconnect: true | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Storage from 'react-native-storage'; | |
import { AsyncStorage } from 'react-native'; | |
var EventEmitter = require('events').EventEmitter; | |
EventEmitter.defaultMaxListeners = 40; | |
import { Segment } from 'expo'; | |
Segment.initialize({androidWriteKey: "xxx", iosWriteKey: "xxx"}); | |
const _FLUSH = false; | |
// Flush all user generated data to assigned currents |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require("fs"); | |
var mysql = require("mysql"); | |
var request = require("request"); | |
var http = require("http"); | |
function uniqueid() { | |
// desired length of Id | |
var idStrLen = 10; | |
// always start with a letter -- base 36 makes for a nice shortcut | |
var idStr = (Math.floor((Math.random() * 25)) + 10).toString(36); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var data = new FormData(); | |
data.append('db', '***'); | |
data.append('pass', '****'); | |
data.append('string', 'WHERE worker_id = "'+localStorage.getItem("worker_id")+'" order by id desc Limit 10'); | |
var xhr = new XMLHttpRequest(); | |
xhr.open('POST', 'http://sunum.pikselbilisim.net/brosur/select.php', true); | |
xhr.onload = function () { | |
//console.log(this.responseText); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
import UIKit | |
var asd = 1; | |
var qwe = "qwe \(asd)"; | |
var asd2 = 1; | |
var ewr2 = 123; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getJSON = function(url, callback) { | |
var xhr = new XMLHttpRequest(); | |
xhr.open("get", url, true); | |
xhr.responseType = "json"; | |
xhr.onload = function() { | |
var status = xhr.status; | |
if (status == 200) { | |
callback(null, xhr.response); | |
} else { | |
callback(status); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$rssLink = "http://forum.fitekran.com/kategori/-/index.rss"; // Your URL | |
$PostLimit = 8; // Limit of posts that will be crawled. | |
$RSSArr = json_decode(file_get_contents("http://rss2json.com/api.json?rss_url=".urlencode($rssLink))); | |
//Using rss2json.com API | |
$i = 0; | |
foreach($RSSArr->items as $rssFeedObj){ | |
if($i < $PostLimit){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true"> | |
<!-- Background of PhotoSwipe. | |
It's a separate element as animating opacity is faster than rgba(). --> | |
<div class="pswp__bg"></div> | |
<!-- Slides wrapper with overflow:hidden. --> | |
<div class="pswp__scroll-wrap"> | |
<!-- Container that holds slides. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get install apache2 | |
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql | |
sudo mysql_install_db | |
sudo /usr/bin/mysql_secure_installation | |
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt | |
sudo nano /etc/apache2/mods-enabled/dir.conf | |
"<IfModule mod_dir.c> |
NewerOlder