Skip to content

Instantly share code, notes, and snippets.

View burakerdem's full-sized avatar
🏠
Working from home

Burak Erdem burakerdem

🏠
Working from home
View GitHub Profile
@burakerdem
burakerdem / progress.php
Created March 23, 2019 16:55
PHP/cURL download progress monitoring (PHP 7.2).
<?php
file_put_contents('progress.txt', '');
if (is_file('progress.txt')) {
unlink('progress.txt');
}
if (is_file('testfile.iso')) {
unlink('testfile.iso');
}
@burakerdem
burakerdem / install.sh
Created July 4, 2016 10:34
Ubuntu installation
#!/usr/bin/env bash
echo "--- Good morning, master. Let's get to work. Installing now. ---"
echo "--- Upgrading and autocleaning system ---"
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y clean
sudo apt-get -y autoremove
sudo apt-get -y purge
@burakerdem
burakerdem / image-2x.less
Created May 14, 2016 12:38 — forked from brandonb927/image-2x.less
@2x LESS CSS Mixin
/**
* I converted the SCSS mixin to LESS for the awesome coders like myself in response to a blog post on 37Signals - http://37signals.com/svn/posts/3271-easy-retina-ready-images-using-scss
*
* Update: 2014-08-04 - Updated a long-standing bug where retina images were shown no matter what in the first background-image property.
* - Updated retina media query to be more reliable ()
* Update: 2013-11-13 - Picked up another technique thanks to reading this post from Tyler Tate, auto-fill in the second filename for the retina image, http://tylertate.com/blog/2013/06/11/retina-images-using-media-queries-and-LESS-CSS.html
* Update: 2013-04-16 - Have recently found a few use cases when using a retina pattern from Subtle Patterns on the <body>, this has come in handy
* Update: 2013-04-05 - Some research in the Wordpress Core(http://core.trac.wordpress.org/ticket/22238#comment:5) was pointed out that some tests may be redundant (Thanks @kbav) so I've cleaned these up
* Update: 2012-12-29 - U
@burakerdem
burakerdem / robot_with_ping.ino
Created March 31, 2016 13:55 — forked from jamesabruce/robot_with_ping.ino
Beginner Robot with Ping Sensor
#include <NewPing.h>
//Tell the Arduino where the sensor is hooked up
NewPing sonar(12, 13);
int enableA = 11;
int pinA1 = 6;
int pinA2 = 5;
int enableB = 10;
@burakerdem
burakerdem / Makefile
Created January 22, 2016 13:50 — forked from holachek/Makefile
AVR Tutorial Makefile
# Name: Makefile
# Author: <insert your name here>
# Copyright: <insert your copyright message here>
# License: <insert your license reference here>
# DEVICE ....... The AVR device you compile for
# CLOCK ........ Target AVR clock rate in Hertz
# OBJECTS ...... The object files created from your source files. This list is
# usually the same as the list of source files with suffix ".o".
# PROGRAMMER ... Options to avrdude which define the hardware you use for
@burakerdem
burakerdem / main.c
Created January 22, 2016 13:50 — forked from holachek/main.c
AVR Tutorial main.c
#define F_CPU 1000000 // CPU frequency for proper time calculation in delay function
#include <avr/io.h>
#include <util/delay.h>
int main(void)
{
DDRD |= (1 << PD6); // make PD6 an output
for(;;)
@burakerdem
burakerdem / Slimdown.md
Created January 8, 2016 12:19 — 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
@burakerdem
burakerdem / gist:d8195e6e343aa55ff578
Created November 17, 2015 22:06
Installing wget on Mac OS X El Capitan 10.11
curl -O http://ftp.gnu.org/gnu/wget/wget-1.17.tar.gz
tar -xzf wget-1.17.tar.gz
cd wget-1.17
./configure --with-ssl=openssl
./configure --with-ssl=openssl --with-libssl-prefix=/usr/local/ssl
make
sudo make install
wget --help
cd .. && rm -rf wget*
@burakerdem
burakerdem / console
Created June 5, 2015 08:07
Installing development version of Laravel
$ composer create-project laravel/laravel [MYAPP] dev-develop --prefer-dist