Skip to content

Instantly share code, notes, and snippets.

View mehmetaydogduu's full-sized avatar
🏍️
Tech goes infinite speed

Mehmet Aydogdu mehmetaydogduu

🏍️
Tech goes infinite speed
View GitHub Profile
Kisi.java dosyası
package odev;
public class Kisi {
String isim;
public String getIsim(){
return isim;
}
@mehmetaydogduu
mehmetaydogduu / Ruby OpenSSL Error Fix
Created March 12, 2017 20:56
RestClient, Faraday, Http, Api
# Find the directory which ruby searches openssl
ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE'
# Download cacert.pem to that directory
!! The file names must be same !!
https://curl.haxx.se/ca/cacert.pem
Example for linux:
ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE'
output: /etc/ssl/cert.pem
@mehmetaydogduu
mehmetaydogduu / Postgresql Setup
Created March 20, 2017 20:32
Commands for create and connect postgre database
1. Install Postgre from any repo or source
-> ... search in www ...
create a directory [ example home/.postgre ]
-> mkdir ~/.postgre
create database system
-> cd ~/.postgre && initdb /data
create database [ example appname_postgredb ]
-> createdb appname
start postgresql
-> pg_ctl -D ~/.postgre/data -l logfile start
@mehmetaydogduu
mehmetaydogduu / main.c
Created September 2, 2018 21:25
C - function inside struct - Javascript Like Solution
# Copy from https://stackoverflow.com/a/32964582/7595238
#include <stdio.h>
typedef struct hello {
int (*someFunction)();
} hello;
int foo() {
return 0;
}
@mehmetaydogduu
mehmetaydogduu / # gazebo9 - 2018-10-24_21-09-04.txt
Created October 31, 2018 15:07
gazebo9 (osrf/simulation/gazebo9) on macOS 10.14 - Homebrew build logs
Homebrew build logs for osrf/simulation/gazebo9 on macOS 10.14
Build date: 2018-10-24 21:09:04
@mehmetaydogduu
mehmetaydogduu / # gazebo9 - 2018-10-31_18-13-57.txt
Created October 31, 2018 16:08
gazebo9 (osrf/simulation/gazebo9) on macOS 10.14 - Homebrew build logs
Homebrew build logs for osrf/simulation/gazebo9 on macOS 10.14
Build date: 2018-10-31 18:13:57
@mehmetaydogduu
mehmetaydogduu / # gazebo9 - 2018-11-05_12-04-41.txt
Created November 5, 2018 10:39
gazebo9 (osrf/simulation/gazebo9) on macOS 10.14 - Homebrew build logs
Homebrew build logs for osrf/simulation/gazebo9 on macOS 10.14
Build date: 2018-11-05 12:04:41
lshw -class network
copy ens7 mac 5a:00:02:a2:a7:06
nano /etc/netplan/10-ens7.yaml
paste and change mac and ip address
network:
version: 2
@mehmetaydogduu
mehmetaydogduu / dropzone_config.coffee
Last active July 20, 2020 17:49
For using dropzone with rails
Dropzone.autoDiscover = false
new_photo_dropzone = new Dropzone('div#new_photo_dropzone', url: '/file/post')
Dropzone.options.new_photo_dropzone =
paramName: 'file'
maxFilesize: 2
Dropzone.options.myAwesomeDropzone =
init: ->
@on 'processing', (file) ->
@options.url = '/some-other-url'
uploadMultiple: false
@mehmetaydogduu
mehmetaydogduu / filepond.coffee
Created July 20, 2020 17:48
filepond config
#= require filepond/dist/filepond
#= require filepond-plugin-file-validate-type/dist/filepond-plugin-file-validate-type
#= require filepond-plugin-file-validate-size/dist/filepond-plugin-file-validate-size
#= require filepond-plugin-image-validate-size/dist/filepond-plugin-image-validate-size
#= require filepond-plugin-image-exif-orientation/dist/filepond-plugin-image-exif-orientation
#= require filepond-plugin-image-transform/dist/filepond-plugin-image-transform
#= require filepond-plugin-image-preview/dist/filepond-plugin-image-preview
#= require filepond-plugin-image-resize/dist/filepond-plugin-image-resize
document.addEventListener 'FilePond:loaded', (e) ->
console.log 'FilePond ready for use', e.detail