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
@aras-p
aras-p / preprocessor_fun.h
Last active Jul 18, 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 Jul 16, 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
@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
@jakebellacera
jakebellacera / ICS.php
Last active Jul 10, 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.
*
@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>
@irae
irae / _Stay_standalone.md
Last active Jun 23, 2019 — forked from kylebarrow/example.html
Stay Standalone: Prevent links in standalone web apps opening Mobile Safari
View _Stay_standalone.md

#Stay Standalone

A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.

@adamgit
adamgit / gist:3705459
Last active Jun 11, 2019
Automatically create cross-platform (simulator + device) static libraries for Objective C / iPhone / iPad
View gist:3705459
##########################################
#
# c.f. http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4
#
# Version 2.82
#
# Latest Change:
# - MORE tweaks to get the iOS 10+ and 9- working
# - Support iOS 10+
# - Corrected typo for iOS 1-10+ (thanks @stuikomma)
@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
*/
@evadne
evadne / gist:4544569
Last active Apr 22, 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!
//
@noteed
noteed / docker-tinc.md
Last active Apr 17, 2019
Docker - Tinc setup
View docker-tinc.md

Running Docker on two hosts, bridged with Tinc

This Gist is similar to https://gist.github.com/noteed/8656989 which uses Open vSwitch instead of Tinc.

Setup

Download the install.sh script and run it:

> https://gist.githubusercontent.com/noteed/11031504/raw/install.sh
You can’t perform that action at this time.