Skip to content

Instantly share code, notes, and snippets.

View webuti's full-sized avatar
😎
I may be slow to respond.

Ömer Faruk PARLAR webuti

😎
I may be slow to respond.
View GitHub Profile
@webuti
webuti / pub-sub.js
Created May 9, 2016 14:14 — forked from reu/pub-sub.js
node.js redis pub-sub example
var redis = require("redis")
, subscriber = redis.createClient()
, publisher = redis.createClient();
subscriber.on("message", function(channel, message) {
console.log("Message '" + message + "' on channel '" + channel + "' arrived!")
});
subscriber.subscribe("test");
@webuti
webuti / nodejs ssh login and git pull
Last active November 18, 2016 15:46
nodejs ssh login and git pull
/* npm install simple-ssh */
var SSH = require('simple-ssh');
var ssh = new SSH({
host: '2.2.2.2',
user: 'root',
pass : 'root'
});
ssh.exec('cd /var/www/site.com/public_html/ && git pull', {

ESP8266 Web Server to storing ap config to EEPROM.

Original by chriscook8 from esp8266.com I just modified to use ESP8266WebServer library for easy to handle the http request.

This is sample code not yet complete.

Todo

  • when Wifi connected need to close the softAP.
agappname.factory('gChart', function() {
var gChart;
var func = {};
func.destroy = function(){
gChart = $('#chartContainer').StockChartX();
gChart.destroy();
}
func.parseBars = function(data, isIntraday) {
var dataSeries = gChart.barDataSeries();
@webuti
webuti / woocommerce sepete adetli ekletme
Created April 27, 2017 10:44
woocommerce sepete adetli ekletme
add_filter( 'woocommerce_loop_add_to_cart_link', 'quantity_inputs_for_woocommerce_loop_add_to_cart_link', 10, 2 );
function quantity_inputs_for_woocommerce_loop_add_to_cart_link( $html, $product ) {
if ( $product && $product->is_type( 'simple' ) && $product->is_purchasable() && $product->is_in_stock() && ! $product->is_sold_individually() ) {
$html = '<form action="' . esc_url( $product->add_to_cart_url() ) . '" class="cart" method="post" enctype="multipart/form-data">';
$html .= woocommerce_quantity_input( array(), $product, false );
$html .= '<button type="submit" class="button product_type_simple add_to_cart_button ">' . esc_html( $product->add_to_cart_text() ) . '</button>';
$html .= '</form>';
}
return $html;
}
@webuti
webuti / Does gearman work?
Created July 25, 2017 11:59
Does gearman work?
var exec = require('child_process').exec;
exec('ps aux | grep gearman', function (error, stdout, stderr) {
stdoutsp = stdout.split('php cli.php');
if (stdoutsp[1]) {
console.log('gearmanWork');
}
@webuti
webuti / proxyfinder.php
Last active September 20, 2017 13:59
proxy ip port finder api json
<?php
function getCache($data = false){
$cache_file = 'proxyip.json';
if (file_exists($cache_file) && (filemtime($cache_file) > (time() - 60 * 60))) {
$file = file_get_contents($cache_file);
@webuti
webuti / tdk parse
Created November 24, 2017 14:41
tdk parse
<?php
$alfabe = 'abcçdefgğhiıjklmnoöprsştuüvyz';
$db = new PDO("mysql:host=localhost;dbname=kelimeler;charset=utf8", "root", "");
function tdkgetir($harf, $sayfa = 0)
{
@webuti
webuti / fonts.scss
Created February 2, 2018 21:12 — forked from bradonomics/fonts.scss
Whitney & Sentinel Fonts CSS File (base64)
@font-face {
font-family: "Whitney SSm SC A";
src: url(data:application/x-font-woff;base64,d09GRk9UVE8AACSFAA0AAAAAN7gAAQAAAAAiXAAAAikAAAaRAAAAAAAAAABDRkYgAAAIzAAAFOgAABjhSw4xdkdERUYAAB20AAAAHQAAACAApQAER1BPUwAAHdQAAALQAAALHqpjoC9HU1VCAAAgpAAAAFoAAACA6dotXU9TLzIAAAGMAAAATwAAAGBZHFc/Y21hcAAABmgAAAJOAAADoIQ7xnlnYXNwAAAhAAAAAAgAAAAIAAAAC2hlYWQAAAEwAAAANAAAADYC7N5yaGhlYQAAAWQAAAAgAAAAJAd+A49obXR4AAAhCAAAAVMAAAHg/fogQW1heHAAAAGEAAAABgAAAAYAeFAAbmFtZQAAAdwAAASKAAALyqV9lZxwb3N0AAAIuAAAABMAAAAg/7gAMnjaY2BkYGBgZHC8dFVtYTy/zVcGbuYXQBGGC5y+JTD6/9X/KszPmB2AXA4GJpAoAGwsDKh42mNgZGBgPvBfgIGBRf//1f/XmZ8xAEVQQAUAoQcHEwAAUAAAeAAAeNpjYGKSYXRlYGVgYdrD1MXAwNADoRnvMhgx/GJAAgsZmP47MDBEw/geas75QEpZUYlZ4b8FwwnmAwwfgPz5IDkmIaarDApAyAQAvV8O/gB42rVUTW/bRhAdWXJsJ7ET+5jTNA2MpJBkyVBiK6eiBgznGhsJAvRQilqJdEQusVxaYZFD7+2xhx7yO3ruD+hP6I/p2+G6puJEcYFWhLhvZ+fjvZkFiehR43dqUPX7Fv8KN+hr7Cq8QmsUetykr+jc41bNZ5U26WePb+HkN4/XaEIfPF6nzcaKxxs1fHtlu3HP4zu002SP79bwZs1ni75p7nt8v8Zhu4Z3BDep0drA7qfm9x436Lj5l8crtNV66HGTvmv1PG7VfFbpQct4fIvWW794vEZ/tn71e
const WebSocket = require('ws')
const wss = new WebSocket('wss://api.bitfinex.com/ws/2')
var bitfinexcr = ['tBTCUSD', 'tETHUSD', 'tXRPUSD', 'tBCHUSD', 'tDSHUSD', 'tETCUSD', 'tLTCUSD', 'tREPUSD', 'tXMRUSD', 'tZECUSD'];
wss.onopen = function () {