Skip to content

Instantly share code, notes, and snippets.

HARUN PEHLİVAN harunpehlivan

View GitHub Profile
@jehiah
jehiah / bitly.rb
Created February 25, 2011 04:46 — forked from richardtifelt/bitly.rb
# Bit.ly API implementation - thanks to Richard Johansso http://gist.github.com/112191
require 'httparty'
class Api::Bitly
include HTTParty
base_uri 'api.bit.ly'
format :json
# Usage: Bitly.shorten("http://example.com")
def self.shorten(url)
@martinsik
martinsik / chat-frontend.js
Last active September 24, 2024 14:54
Node.js chat frontend and server
$(function () {
"use strict";
// for better performance - to avoid searching in DOM
var content = $('#content');
var input = $('#input');
var status = $('#status');
// my color assigned by the server
var myColor = false;
@tedmiston
tedmiston / nodejs-tcp-example.js
Last active October 9, 2024 11:32
Node.js TCP client and server example
/*
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
*/
var net = require('net');
@Ninjex
Ninjex / main.rb
Last active December 21, 2019 20:58
Hackthisite Programming 2 (Requires Mechanize and RMagick gems) -- Autocompletion
#!/usr/bin/ruby
# ███▄ █ ██▓ ███▄ █ ▄▄▄██▀▀▀▓█████ ▒██ ██▒
# ██ ▀█ █ ▓██▒ ██ ▀█ █ ▒██ ▓█ ▀ ▒▒ █ █ ▒░
# ▓██ ▀█ ██▒▒██▒▓██ ▀█ ██▒ ░██ ▒███ ░░ █ ░
# ▓██▒ ▐▌██▒░██░▓██▒ ▐▌██▒▓██▄██▓ ▒▓█ ▄ ░ █ █ ▒
# ▒██░ ▓██░░██░▒██░ ▓██░ ▓███▒ ░▒████▒▒██▒ ▒██▒
# ░ ▒░ ▒ ▒ ░▓ ░ ▒░ ▒ ▒ ▒▓▒▒░ ░░ ▒░ ░▒▒ ░ ░▓ ░
# ░ ░░ ░ ▒░ ▒ ░░ ░░ ░ ▒░ ▒ ░▒░ ░ ░ ░░░ ░▒ ░
# ░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░
# ░ ░ ░ ░ ░ ░ ░ ░ ░
@Ninjex
Ninjex / MD5Pass.js
Last active January 10, 2018 10:42
MD5Pass
// ==UserScript==
// @name MDPass
// @namespace *
// @include https://*/*
// @description View parital MD5 values of password fields for visual comparison.
// @version 1
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js
// @grant none
// ==/UserScript==
@d2s
d2s / installing-node-with-nvm.md
Last active October 20, 2024 13:06
Installing Node.js to Linux & macOS & WSL with nvm

Installing Node.js with nvm to Linux & macOS & WSL

A quick guide on how to setup Node.js development environment.

Install nvm for managing Node.js versions

nvm allows installing several versions of Node.js to the same system. Sometimes applications require a certain versions of Node.js to work. Having the flexibility of using specific versions can help.

  1. Open new Terminal window.
@egonSchiele
egonSchiele / logistic_regression_grapefruit.m
Created March 10, 2016 03:54
Logistic regression for orange vs grapefruit
% data
x = [1, 2, 3, 4, 5, 6];
y = [0, 0, 0, 1, 1, 1];
% function to calculate the predicted value
function result = h(x, t0, t1)
result = sigmoid(t0 + t1 * x);
end
% sigmoid function
@coryhouse
coryhouse / package.json
Last active April 15, 2023 15:08
package.json for Building a JS Development Environment on Pluralsight
{
"name": "javascript-development-environment",
"version": "1.0.0",
"description": "JavaScript development environment Pluralsight course by Cory House",
"scripts": {
},
"author": "Cory House",
"license": "MIT",
"dependencies": {
"whatwg-fetch": "1.0.0"
@harunpehlivan
harunpehlivan / index.pug
Last active September 3, 2017 21:51
Web Presence
.web-presence
a.web-presence__anchor.web-presence__anchor--me(href='http://harunpehlivantebimtebitagem.ml/')
.web-presence__anchor--me__text HARUN PEHLİVAN
img.web-presence__anchor--me__img(src='http://www.doyoubuzz.com/var/users/_/2016/11/15/18/1300826/avatar/1253797/avatar_cp_630.jpg?t=1504092899')
.web-presence__anchor--me__text FOUNDER CEO BLOGGER
a.web-presence__anchor.web-presence__anchor--codepen(href='https://codepen.io/harunpehlivan/')
i.web-presence__anchor__icon.fa.fa-codepen
@harunpehlivan
harunpehlivan / index.html
Last active August 19, 2019 13:10
Material Profile
<div class="material-wrap">
<div class="material clearfix">
<div class="top-bar">
<div class="pull-left">
<a href="#" class="menu-tgl pull-left"><i class="fa fa-bars"></i></a>
</div>
<span class="title">Profile</span>
<div class="pull-right">
<a href="#" class="search-tgl pull-left"><i class="fa fa-search"></i></a>
<a href="#" class="option-tgl pull-left"><i class="fa fa-ellipsis-v"></i></a>