Skip to content

Instantly share code, notes, and snippets.

View mustafat0k's full-sized avatar
🚀
Go

Mustafa mustafat0k

🚀
Go
View GitHub Profile
#include <stdio.h>
#include <signal.h>
#include <syslog.h>
#include <errno.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
@mustafat0k
mustafat0k / daemon.cpp
Created October 22, 2019 18:21 — forked from alexdlaird/daemon.cpp
Useful as a starting point for a C++ based Linux daemon application.
#include <dirent.h>
#include <iterator>
#include <cstdlib>
#include <cstring>
#include <sstream>
#include <iostream>
#include <stdlib.h>
#include <string>
#include <sys/stat.h>
#include <syslog.h>
@mustafat0k
mustafat0k / HTML5StorageMultidimensional.js
Created March 4, 2018 16:17 — forked from klederson/HTML5StorageMultidimensional.js
Adding Multidimensional Support for javascript / html5 sessionStorage , localStorage or just Storage object
/**
*
* MOVED TO: https://github.com/iFind/html5MultidimensionalStorage
*
* This methods extends the default HTML5 Storage object and add support
* to set and get multidimensional data
*
* @example Storage.setObj('users.albums.sexPistols',"blah");
* @example Storage.setObj('users.albums.sexPistols',{ sid : "My Way", nancy : "Bitch" });
* @example Storage.setObj('users.albums.sexPistols.sid',"Other songs");
@mustafat0k
mustafat0k / mail.py
Created September 14, 2017 03:26 — forked from anonymous/mail.py
Mail Sender
import smtplib as sm
from tkinter import *
class MailSender():
def __init__(self):
self.pencere = Tk()
self.giris_pencere_olustur()
def giris_pencere_olustur(self):
@mustafat0k
mustafat0k / pubsub.js
Created February 18, 2017 17:34 — forked from learncodeacademy/pubsub.js
Basic Javascript PubSub Pattern
//events - a super-basic Javascript (publish subscribe) pattern
var events = {
events: {},
on: function (eventName, fn) {
this.events[eventName] = this.events[eventName] || [];
this.events[eventName].push(fn);
},
off: function(eventName, fn) {
if (this.events[eventName]) {
@mustafat0k
mustafat0k / js-crypto-libraries.md
Created February 17, 2017 22:35 — forked from jo/js-crypto-libraries.md
List of JavaScript Crypto libraries.

JavaScript Crypto Libraries

I start with a list and plan to create a comparison table.

WebCryptoAPI

http://www.w3.org/TR/WebCryptoAPI/

This specification describes a JavaScript API for performing basic cryptographic operations in web applications, such as hashing, signature generation and verification, and encryption and decryption. Additionally, it describes an API for applications to generate and/or manage the keying material necessary to perform these operations. Uses for this API range from user or service authentication, document or code signing, and the confidentiality and integrity of communications.

<?php
class CountriesTableSeeder extends Seeder {
public function run()
{
Country::insert([
[
'long_name' => 'Afghanistan',
'short_name' => 'AF',
@mustafat0k
mustafat0k / .js
Created November 16, 2016 08:38 — forked from Alexintosh/$localstorage
Angular factory for local storage
.factory('$localstorage', ['$window', function($window) {
return {
set: function(key, value) {
$window.localStorage[key] = value;
},
get: function(key, defaultValue) {
return $window.localStorage[key] || false;
},
setObject: function(key, value) {
$window.localStorage[key] = JSON.stringify(value);
@mustafat0k
mustafat0k / .html Cordova Camera Plugin Cordova plugin camera foto cek kayit et server e jquery ajax ile yükle cordova-plugin-camera upload jquery ajax to server request
<!DOCTYPE html>
<!-- Aysad Kozanoglu -->
<html>
<head>
<title>foto cek</title>
<style>
html {
-webkit-user-select: none;
}
</style>