Skip to content

Instantly share code, notes, and snippets.

View beydogan's full-sized avatar
🎯
Focusing

Mehmet Beydogan beydogan

🎯
Focusing
  • Hamburg, Germany
View GitHub Profile

Keybase proof

I hereby claim:

  • I am beydogan on github.
  • I am melikealp (https://keybase.io/melikealp) on keybase.
  • I have a public key ASDgGRSfdThqHAFxdbPjmprbzQ0SQOeu1CUCfcBVxwtg1wo

To claim this, I am signing this object:

remotipart (1.3.1) lib/remotipart/render_overrides.rb:16:in `render_with_remotipart'
() home/mehmet/.rvm/gems/ruby-2.4.0@adveli/bundler/gems/wicked_pdf-6b8e50710954/lib/wicked_pdf/pdf_helper.rb:46:in `call'
() home/mehmet/.rvm/gems/ruby-2.4.0@adveli/bundler/gems/wicked_pdf-6b8e50710954/lib/wicked_pdf/pdf_helper.rb:46:in `render_with_wicked_pdf'
() home/mehmet/.rvm/gems/ruby-2.4.0@adveli/bundler/gems/wicked_pdf-6b8e50710954/lib/wicked_pdf/pdf_helper.rb:30:in `render'
remotipart (1.3.1) lib/remotipart/render_overrides.rb:16:in `render_with_remotipart'
() home/mehmet/.rvm/gems/ruby-2.4.0@adveli/bundler/gems/wicked_pdf-6b8e50710954/lib/wicked_pdf/pdf_helper.rb:46:in `call'
() home/mehmet/.rvm/gems/ruby-2.4.0@adveli/bundler/gems/wicked_pdf-6b8e50710954/lib/wicked_pdf/pdf_helper.rb:46:in `render_with_wicked_pdf'
() home/mehmet/.rvm/gems/ruby-2.4.0@adveli/bundler/gems/wicked_pdf-6b8e50710954/lib/wicked_pdf/pdf_helper.rb:30:in `render'
remotipart (1.3.1) lib/remotipart/render_overrides.rb:16:i
def self.some_method
users = User.some_scope
users.each do |user|
user.foo
end
end
@beydogan
beydogan / setting.rb
Last active October 25, 2015 11:34
Rails application wide settings storage using Redis
# Class to store and get application-wide settings by using Redis as storage
# REDIS might be defined in an initiliazier. As following.
# REDIS = Redis.new
# @example
# Setting.set(:setting_1, true)
# Setting.get(:setting_1) # true
class Setting
DEFAULTS = {
setting_1: false
setting_2: 5
class A
private def method_name
"iyi senden naber"
end
private def method_name2
"iyidir"
end
end
@beydogan
beydogan / gist:90f999cf3d672068cded
Last active August 29, 2015 14:14
Boat Controller
using UnityEngine;
using System.Collections;
public class ShipController : MonoBehaviour {
public GameObject oRudder;
public float throttle = 0.0f;
public float throttleRate = 0.1f;
public float throttleStep = 0.1f;
public float accRate = 4.3f;
<h5>We are happy to serve you! </h5>
Hi! Welcome to 2gossip. Please read this carefully before using our services, and contact us 1 if you have any questions or suggestions.
<h5>Terms of Service</h5>
We are social network to specialized in gossip, confession, rumor and more!
The service;
help people learn gossip about himself/herself
gossip and confession easily on places/school/university/hospital…
owner of places can learn truth about their places
661
667
663
669
666
667
765
519
627
824
148
894
1023
160
555
1023
396
246
1023
737
@beydogan
beydogan / arduino-acs712
Created May 28, 2014 20:23
getSensorValues ACS712 - not working
void getSensorValues(){
unsigned long currentAcc = 0;
unsigned int count = 0;
unsigned long prevMicros = micros() - sampleInterval ;
while (count < numSamples)
{
if (micros() - prevMicros >= sampleInterval)
{
int adc_raw = analogRead(0) - adc_zero;
currentAcc += (unsigned long)(adc_raw * adc_raw);