Skip to content

Instantly share code, notes, and snippets.

View akinozgen's full-sized avatar
:bowtie:

Akın Özgen akinozgen

:bowtie:
View GitHub Profile

ABANDONED FOR A WHILE (OR PERMANENTLY)

11.02.2017

  1. Bash script initialized
  2. We have registry issue.

10.02.2017

  1. Empty output line issue from output class solved.
@akinozgen
akinozgen / gist:e97ba2e2e663939ac4d31137db5d93f1
Created April 29, 2017 11:07 — forked from prime31/gist:5675017
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call scriptName.php?id=THE_DEVICE_REGISTRATION_ID
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array
@akinozgen
akinozgen / .htaccess
Created July 20, 2017 10:15
perfect htaccess for my frameworks
# Open rewriteEngine
RewriteEngine on
# Allow removing /resources, index,
# index.php, robots.txt and robots
# from url
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
@akinozgen
akinozgen / index.android.js
Created September 16, 2017 23:10
ReactNative Firebase Image Upload
import React, { Component } from 'react';
import { AppRegistry, View, Text, Button } from 'react-native';
import firebase from 'firebase';
import ImagePicker from 'react-native-image-picker';
import RNFetchBlob from 'react-native-fetch-blob';
const firebaseConfig = {
apiKey: "AIzaSyAtsN21kfXEOzG-uYvDqwOnkPpNx9KP1s8",
authDomain: "fir-reactnative-ad507.firebaseapp.com",
databaseURL: "https://fir-reactnative-ad507.firebaseio.com",
# code modified, tweaked and tailored from code by bertwert
# on RPi forum thread topic 91796
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
# GPIO ports for the 7seg pins
segments = (11,4,23,8,7,10,18,25)
# 7seg_segment_pins (11,7,4,2,1,10,5,3) + 100R inline
@akinozgen
akinozgen / clearfix.css
Created December 12, 2017 01:38
clearfix
/**
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
* contenteditable attribute is included anywhere else in the document.
* Otherwise it causes space to appear at the top and bottom of elements
* that are clearfixed.
* 2. The use of `table` rather than `block` is only necessary if using
* `:before` to contain the top-margins of child elements.
*/
.cf:before,
@akinozgen
akinozgen / .htaccess
Last active March 20, 2018 11:24 — forked from alch/.htaccess
Symfony full .htaccess file
# Based on http://stackoverflow.com/questions/17313023/symfony-2-2-1-url-rewrite-issue
# Use the front controller as index file. It serves as fallback solution when
# every other rewrite/redirect fails (e.g. in an aliased environment without
# mod_rewrite). Additionally, this reduces the matching process for the
# startpage (path "/") because otherwise Apache will apply the rewritting rules
# to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl).
DirectoryIndex index.php
#DirectoryIndex app_dev.php
//sürücü
const int motorA1 = 5;
const int motorA2 = 6;
const int motorB1 = 10;
const int motorB2 = 9;
int i=0;
int j=0;
int state;
int vSpeed=255;
Log
C:\Users\Akin Ozgen\Desktop\backup-4.2.2018_11-36-39_u7356236\homedir\backup-4.2.2018_11-36-39_u7356236.tar.gz » GZIP » backup-4.2.2018_11-36-39_u7356236.tar » TAR » backup-4.2.2018_11-36-39_u7356236/homedir/17napolipizza.com/admin/public/fonts/favicon_4f7210.ico - PHP/Kryptik.BC trojan - action selection postponed until scan completion
C:\Users\Akin Ozgen\Desktop\backup-4.2.2018_11-36-39_u7356236\homedir\backup-4.2.2018_11-36-39_u7356236.tar.gz » GZIP » backup-4.2.2018_11-36-39_u7356236.tar » TAR » backup-4.2.2018_11-36-39_u7356236/homedir/17napolipizza.com/api/vendor/filp/whoops/hryaysyy.php - PHP/Agent.KG trojan - action selection postponed until scan completion
C:\Users\Akin Ozgen\Desktop\backup-4.2.2018_11-36-39_u7356236\homedir\backup-4.2.2018_11-36-39_u7356236.tar.gz » GZIP » backup-4.2.2018_11-36-39_u7356236.tar » TAR » homedir/17napolipizza.com/api/vendor/symfony/process/ProcessUtils.php - PHP/Kryptik.BL trojan - action selection postponed until scan completion
C:\Users\Akin Ozgen\Desktop\backup-
@akinozgen
akinozgen / php_executable_finder.php
Last active November 17, 2018 08:28
Best way to find php executable
<?php
function getPHPExecutable() {
$phpExecutable = file_exists('/usr/bin/php') ? '/usr/bin/php' : false;
if (!$phpExecutable) {
exec('which php', $phpExecutableRawPath);
if (!strpos($phpExecutableRawPath[0], '/php')) {
if (!strpos(PHP_BINARY, '/php'))