Skip to content

Instantly share code, notes, and snippets.

View gokmen's full-sized avatar
🎯
Focusing

Gokmen Goksel gokmen

🎯
Focusing
View GitHub Profile
@gokmen
gokmen / main.cpp
Created April 30, 2012 14:16
If you have trouble with QWebView and SSL errors you can ignore SSL errors to render page correctly.
#include <QDebug>
#include <QWidget>
#include <QNetworkReply>
#include <QSslConfiguration>
App::App(QWidget *parent) :
QWidget(parent),
ui(new Ui::App)
{
ui->setupUi(this);
@gokmen
gokmen / dllmain.cpp
Created May 18, 2012 22:11
If you ever need a QApplication mainloop in a DLL u can use following header concept for your DLL.
static QApplication* app;
static int argc = 0;
BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID lpReserved)
{
switch (reason)
{
case DLL_PROCESS_ATTACH:
{
app = new QApplication(argc, NULL);
@gokmen
gokmen / synchronous.cpp
Created May 20, 2012 00:21
Block process in Qt way.
{
QEventLoop loop;
connect(reply, SIGNAL(finished()), &loop, SLOT(quit()));
loop.exec();
}
@gokmen
gokmen / dabblet.css
Created September 24, 2012 20:36 — forked from james2doyle/dabblet.css
event widget
/**
* event widget
* url: http://dribbble.com/shots/713807-Extended
*/
@import url(http://fonts.googleapis.com/css?family=Open+Sans:300);
* {
box-sizing: border-box;
}
@gokmen
gokmen / wf-gapps.py
Created September 29, 2012 18:38
Webfaction Google Apps record creator
#!/usr/bin/env python2.5
import sys
import getpass
import xmlrpclib
server = xmlrpclib.Server('https://api.webfaction.com/')
username = raw_input("Username : ")
password = getpass.getpass("Password : ")
@gokmen
gokmen / bounce.coffee
Created January 4, 2013 18:55
Bounce Coffee example for KD framework
# Your awesome Koding App Code
class MainView extends JView
constructor:->
super
@ball = new KDView
cssClass : 'ball'
@gokmen
gokmen / index.coffee
Last active December 17, 2015 21:39 — forked from anonymous/index.coffee
React's secondsElapsed example with KDFramework
class Timer extends JView
constructor:->
super cssClass: 'timer'
@setData secondsElapsed : 0
viewAppended:->
super
setInterval (@bound 'tick'), 1000
@gokmen
gokmen / index.coffee
Created May 30, 2013 08:00 — forked from anonymous/index.coffee
React's markdown example with KDFramework
class Markdown extends JView
constructor:->
super cssClass : 'markdown',
markdown : "Type some *markdown* here!"
@textInput = new KDInputView
bind : "keyup"
type : "textarea"
defaultValue : @data.markdown
@gokmen
gokmen / nodetest.js
Created August 9, 2013 10:55
Simple NodeJs test script to run it correctly on Koding VMs, the point is using the default address as 0.0.0.0 instead 127.0.0.1
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(3000, '0.0.0.0');
console.log('Server running at 3000');

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname