Skip to content

Instantly share code, notes, and snippets.

View ahmeti's full-sized avatar
🎯
Focusing

Ahmet Imamoglu ahmeti

🎯
Focusing
View GitHub Profile
@ahmeti
ahmeti / excel2mysqlinsert.html
Last active October 1, 2016 22:20
EXCEL TO MYSQL INSERT
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Excel to Mysql Insert</title>
<script>
function run()
{
var query='';
@ahmeti
ahmeti / wp-db.php
Last active February 12, 2017 11:36
Wordpress Disable utf8mb4 Charset (Use utf8_general_ci)
<?php
# wp-includes/wp-db.php
/**
* Determines the best charset and collation to use given a charset and collation.
*
* For example, when able, utf8mb4 should be used instead of utf8.
*
* @since 4.6.0
* @access public
$ cd ~/Library
$ mkdir KeyBindings
$ cd KeyBindings
$ vi DefaultKeyBinding.dict
{
/* Remap Home / End keys to be correct */
"\UF729" = "moveToBeginningOfLine:"; /* Home */
"\UF72B" = "moveToEndOfLine:"; /* End */
"$\UF729" = "moveToBeginningOfLineAndModifySelection:"; /* Shift + Home */
@ahmeti
ahmeti / Multi Array Combination
Last active May 14, 2017 21:25
combination.php
<?php
$refinements=array(
'Type' => array(
'Toppe',
'Bukser_og_Jeans'
),
'Size' => array(
'Extra_small',
'Small'
if ( $post->post_parent )
{
wp_redirect( get_permalink( $post->post_parent ), 301 );
}
else
{
wp_redirect( site_url(), 301 ) );
}
die();

File: vendor\laravel\framework\src\Illuminate\Database\Connectors\MySqlConnector.php

Edit

return isset($port)
  ? "mysql:host={$host};port={$port};dbname={$database}"
  : "mysql:host={$host};dbname={$database}";

Change

<?php
///////////////////////////////////////////////////
// STEP 1 - CREATE CLASS THAT WILL BE USED GLOBALY
///////////////////////////////////////////////////
namespace App\MyApp;
class MyApp {
public function sayHello($data = [])
{
echo "Hello World from Facade!";
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Excel to Mysql Insert</title>
<script>
function run()
{
var query='';
@ahmeti
ahmeti / github_post_recieve.php
Created November 21, 2017 10:14 — forked from cowboy/github_post_recieve.php
GitHub PHP webhook to auto-pull on repo push
<?php
// Use in the "Post-Receive URLs" section of your GitHub repo.
if ( $_POST['payload'] ) {
shell_exec( 'cd /srv/www/git-repo/ && git reset --hard HEAD && git pull' );
}
?>hi

01. Npm Install

ng new test-project
npm install bootstrap@3 --save
npm install admin-lte --save
npm install font-awesome --save
npm install sweetalert2 --save