Skip to content

Instantly share code, notes, and snippets.

💭
Set your status

Furkan Mustafa furkanmustafa

💭
Set your status
Block or report user

Report or block furkanmustafa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jakebellacera
jakebellacera / ICS.php
Last active Nov 15, 2019
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
View ICS.php
<?php
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
@aras-p
aras-p / preprocessor_fun.h
Last active Nov 14, 2019
Things to commit just before leaving your job
View preprocessor_fun.h
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@saetia
saetia / gist:1623487
Last active Nov 9, 2019
Clean Install – OS X 10.11 El Capitan
View gist:1623487

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@FredEckert
FredEckert / framebuffer.c
Created Aug 22, 2012
Paint Pixels to Screen via Linux FrameBuffer
View framebuffer.c
/*
To test that the Linux framebuffer is set up correctly, and that the device permissions
are correct, use the program below which opens the frame buffer and draws a gradient-
filled red square:
retrieved from:
Testing the Linux Framebuffer for Qtopia Core (qt4-x11-4.2.2)
http://cep.xor.aps.anl.gov/software/qt4-x11-4.2.2/qtopiacore-testingframebuffer.html
*/
@kylebarrow
kylebarrow / example.html
Created Jun 23, 2011
Prevent links in standalone web apps opening Mobile Safari
View example.html
<!DOCTYPE html>
<head>
<title>Stay Standalone</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<script src="stay_standalone.js" type="text/javascript"></script>
</head>
<body>
<ul>
<li><a href="http://google.com/">Remote Link (Google)</a></li>
@diorahman
diorahman / steps.md
Last active Nov 1, 2019
Build WebKitGTK+ from release tarball
View steps.md
$ wget http://webkitgtk.org/releases/webkitgtk-{major}.{minor}.{rev}.tar.xz
$ tar xJf webkitgtk-{major}.{minor}.{rev}.tar.xz
$ cd webkitgtk-{major}.{minor}.{rev}
$ ./Tools/gtk/install-dependencies
$ mkdir build
$ cd build
$ cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=Release ..
// resolve missing required deps
// most likely: sudo apt-get install libgstreamer-plugins-base1.0-dev, libgstreamer1.0-dev
@mattm7n
mattm7n / gist:1405067
Created Nov 29, 2011
Monitor DHCP traffic with tcpdump
View gist:1405067
# Monitoring on interface eth0
tcpdump -i eth0 -n port 67 and port 68
View getargv.c
/* Copied, Pasted and summarized from ps' source code.
You can use sysctl to get other process' argv.
*/
#include <sys/sysctl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define pid_of(pproc) pproc->kp_proc.p_pid
@jessedearing
jessedearing / gist:2351836
Created Apr 10, 2012 — forked from twoism-dev/gist:1183437
Create self-signed SSL certificate for Nginx
View gist:2351836
#!/bin/bash
echo "Generating an SSL private key to sign your certificate..."
openssl genrsa -des3 -out myssl.key 1024
echo "Generating a Certificate Signing Request..."
openssl req -new -key myssl.key -out myssl.csr
echo "Removing passphrase from key (for nginx)..."
cp myssl.key myssl.key.org
openssl rsa -in myssl.key.org -out myssl.key
@evadne
evadne / gist:4544569
Last active Oct 2, 2019
Todd Laney’s enhancements to Sticky Headers + UICollectionViewFlowLayout
View gist:4544569
//
// StickyHeaderLayout.h
// Wombat
//
// Created by Todd Laney on 1/9/13.
// Copyright (c) 2013 ToddLa. All rights reserved.
//
// Modified from http://blog.radi.ws/post/32905838158/sticky-headers-for-uicollectionview-using THANKS!
//
You can’t perform that action at this time.