// jQuery
$(document).ready(function() {
// code
})
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\mymodule\Form; | |
use Drupal\Core\Form\FormBase; | |
use Drupal\Core\Form\FormStateInterface; | |
/** | |
* Provides a custom form. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
class BlogController extends Controller | |
{ | |
/** | |
* Display a listing of the resource. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant@drupalvm:/var/www/drupalvm/drupal/web/sites$ apache2 -t | |
[Tue Dec 04 06:05:44.695289 2018] [core:warn] [pid 12410] AH00111: Config variable ${APACHE_LOCK_DIR} is not defined | |
[Tue Dec 04 06:05:44.695870 2018] [core:warn] [pid 12410] AH00111: Config variable ${APACHE_PID_FILE} is not defined | |
[Tue Dec 04 06:05:44.696349 2018] [core:warn] [pid 12410] AH00111: Config variable ${APACHE_RUN_USER} is not defined | |
[Tue Dec 04 06:05:44.696636 2018] [core:warn] [pid 12410] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined | |
[Tue Dec 04 06:05:44.697012 2018] [core:warn] [pid 12410] AH00111: Config variable ${APACHE_LOG_DIR} is not defined | |
[Tue Dec 04 06:05:44.712536 2018] [core:warn] [pid 12410:tid 139739474769792] AH00111: Config variable ${APACHE_LOG_DIR} is not defined | |
AH00526: Syntax error on line 74 of /etc/apache2/apache2.conf: | |
Invalid Mutex directory in argument file:${APACHE_LOCK_DIR} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\mitacan\Form; | |
use Drupal\Core\Form\FormBase; | |
use Drupal\Core\Form\FormStateInterface; | |
class MitacanUploadForm extends FormBase { | |
public function buildForm(array $form, FormStateInterface $form_state) { | |
$form['csv_upload'] = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Continents and Countries MySQL Tables compiled from Wikipedia, Braintree Payments documentation | |
* and a couple other places I don't recall at the moment. This data is compatible with the Braintree | |
* Payment API as of Dec 2011 | |
* | |
* Compiled by Steve Kamerman, 2011 | |
*/ | |
SET FOREIGN_KEY_CHECKS=0; | |
-- ---------------------------- |
Use these rapid keyboard shortcuts to control the GitHub Atom text editor on Mac OSX.
- ⌘ : Command key
- ⌃ : Control key
- ⌫ : Delete key
- ← : Left arrow key
- → : Right arrow key
- ↑ : Up arrow key
##npm komutları
npm install -g cordova
node.js kullanarak cordova'yı bilgisayarınıza yükler.
##cordova komutları
cordova create hello com.example.hello HelloWorld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$host = "db hostname"; | |
$dbname = "db name"; | |
$user = "db username"; | |
$pass = "db password"; | |
$charset = "UTF8MB4"; // if your db does not use CHARSET=UTF8MB4, you should probably be fixing that | |
$dsn = "mysql:host={$host};dbname={$dbname};charset={$charset}"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ldap | |
def check_credentials(username, password): | |
"""Verifies credentials for username and password. | |
Returns None on success or a string describing the error on failure | |
# Adapt to your needs | |
""" | |
LDAP_SERVER = 'ldap://xxx' | |
# fully qualified AD user name | |
LDAP_USERNAME = '%[email protected]' % username |