Skip to content

Instantly share code, notes, and snippets.

View resultakak's full-sized avatar
👨‍💻
Focusing

Resul Takak resultakak

👨‍💻
Focusing
View GitHub Profile
@resultakak
resultakak / Slimdown.md
Created November 9, 2016 11:31 — forked from jbroadway/Slimdown.md
Slimdown - A simple regex-based Markdown parser.

Slimdown

A very basic regex-based Markdown parser. Supports the following elements (and can be extended via Slimdown::add_rule()):

  • Headers
  • Links
  • Bold
  • Emphasis
  • Deletions
@resultakak
resultakak / RegEx Snippets.md
Created November 21, 2016 14:06 — forked from ericrasch/RegEx Snippets.md
RegEx Snippets

RegEx Snippets


Extract URLs

Find all links

Works pretty well in capturing the full URL when using this in a search (like in Sublime Text 2). (https?|ftps?)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/?

@resultakak
resultakak / gist:4ce20c3449807943f0371d284ececfaa
Created December 13, 2016 08:43 — forked from prime31/gist:5675017
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call scriptName.php?id=THE_DEVICE_REGISTRATION_ID
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array
@resultakak
resultakak / LetsEncrypt.md
Created January 5, 2017 15:08 — forked from davestevens/LetsEncrypt.md
Let’s Encrypt setup for Apache, NGINX & Node.js

Let's Encrypt

Examples of getting certificates from Let's Encrypt working on Apache, NGINX and Node.js servers.

Obtain certificates

I chose to use the manual method, you have to make a file available to verify you own the domain. Follow the commands from running

git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
@resultakak
resultakak / _ide_helper.php
Created January 5, 2017 23:09 — forked from barryvdh/_ide_helper.php
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.1.40 (LTS) on 2016-07-18.
*
* @author Barry vd. Heuvel <[email protected]>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
@resultakak
resultakak / PhpStorm Keyboard Shortcuts.md
Created January 6, 2017 09:20 — forked from koomai/PhpStorm Keyboard Shortcuts.md
Frequently Used PhpStorm Keyboard Shortcuts

Note: Some of these shortcuts have been remapped for my own convenience (Preferences->Keymap). These are Mac shortcuts, just use the Windows/Linux equivalent of the Cmd/Option/Ctrl/Del keys.

####Search, Go to, Navigation ####

Cmd + P - Search file

Cmd + Shift + O - Search everywhere

(I swapped the above two recently because I use Cmd + P to search for files most of the time).

@resultakak
resultakak / keyboard-shortcuts.md
Created January 6, 2017 09:23 — forked from erikgall/keyboard-shortcuts.md
IDE Keyboard Shortcuts

IDE Keyboard Shortcuts

Text/Line Manipulation

  • cmd-f Search & Find Text (in file)
  • cmd-shift-f Search & Find Text (project wide)
  • cmd-d Duplicate Current Line
  • cmd-x Cut Current Line

Rubymine/PHPStorm Custom Shortcuts

  • cmd-1 Project Directory Treeview
@resultakak
resultakak / script.js
Last active May 19, 2020 19:01
Sticky Header
// https://jsfiddle.net/gxRC9/502/
// var stickyOffset = $('.sticky').offset().top;
$(window).scroll(function(){
var sticky = $('.sticky'),
scroll = $(window).scrollTop();
// if (scroll >= stickyOffset) sticky.addClass('fixed');
if (scroll >= 200) sticky.addClass('fixed');
else sticky.removeClass('fixed');
});
@resultakak
resultakak / secim.py
Last active May 24, 2020 19:20
secim
secmen = 15
aday = 3
esitlik = secmen / aday
ece = 0
efe = 0
ege = 0
gecersiz = 0
@resultakak
resultakak / remote_bash.sh
Created September 12, 2020 17:39 — forked from n0ts/remote_bash.sh
execute bash script from remote site
# http://stackoverflow.com/questions/5735666/execute-bash-script-from-url
bash <(curl -s http://mywebsite.com/myscript.txt)
# http://stackoverflow.com/questions/4642915/passing-parameters-to-bash-when-executing-a-script-fetched-by-curl
curl http://foo.com/script.sh | bash -s arg1 arg2