Skip to content

Instantly share code, notes, and snippets.

I'm using skype, see you again.

umut yerebakmaz umutyerebakmaz

I'm using skype, see you again.
View GitHub Profile
sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.jdk/
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane
msmfsd / es7-async-await.js
Last active Feb 8, 2021
Javascript fetch JSON with ES7 Async Await
View es7-async-await.js
// Async/Await requirements: Latest Chrome/FF browser or Babel:
// Fetch requirements: Latest Chrome/FF browser or Github fetch polyfill:
// async function
async function fetchAsync () {
// await response of fetch call
let response = await fetch('');
// only proceed once promise is resolved
let data = await response.json();
// only proceed once second promise is resolved
dtomasi / default
Last active Feb 23, 2021
Brew Nginx PHP7
View default
server {
listen 80;
server_name localhost;
root /Users/YOUR_USERNAME/Sites;
access_log /Library/Logs/default.access.log main;
location / {
include /usr/local/etc/nginx/conf.d/php-fpm;
dimitardanailov / sample-nginx.conf
Last active Jan 8, 2020
Configuration for Laravel 5 application and Nginx
View sample-nginx.conf
server {
listen 80 default deferred;
access_log /var/www/laravel-app/access.log;
error_log /var/www/laravel-app/error.log;
root /var/www/laravel-app/public/;
View ifconfig.php
function ifconfig() {
"inet addr:([0-9.]+).\*Bcast:([0-9.]+).\*Mask:([0-9.]+).*".
"RX packets:([0-9.]+).\*errors:([0-9.]+).\*dropped:([0-9.]+).\*overruns:([0-9.]+).\*frame:([0-9.]+).*".
"TX packets:([0-9.]+).\*errors:([0-9.]+).\*dropped:([0-9.]+).\*overruns:([0-9.]+).\*carrier:([0-9.]+).*".
"RX bytes:([0-9.]+).\*\((.\*)\).*TX bytes:([0-9.]+).\*\((.\*)\)".
"/ims", $int, $regex);
cschaba / gist:4740380
Created Feb 8, 2013
PHP: parse output of ifconfig (tested with Ubuntu Linux)
View gist:4740380
// from
$data = <<<EOF
eth0 Link encap:Ethernet HWaddr 00:50:56:33:B6:D2
inet addr: Bcast: Mask:
RX packets:1337 errors:0 dropped:0 overruns:0 frame:0
TX packets:985 errors:0 dropped:0 overruns:0 carrier:0