Skip to content

Instantly share code, notes, and snippets.

View cyberlex404's full-sized avatar
🏠
Working from home

Lex Misiuro cyberlex404

🏠
Working from home
View GitHub Profile
@cyberlex404
cyberlex404 / .gitconfig
Created November 19, 2019 08:01 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = [email protected]
username = pksunkara
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
@cyberlex404
cyberlex404 / xdebug-php.md
Created December 27, 2017 13:33 — forked from ankurk91/xdebug-mac.md
php xDebug on Ubuntu/Mac and phpStorm 2017

🪲 Install and Configure xDebug on Ubuntu/Mac and PhpStorm 🐘

  • Assuming that you have already installed php and apache
  • Install xDebug php extension
# Ubuntu 16.04, php 7.0
sudo apt-get install php-xdebug

# Ubuntu 14.04, php 5.6 
sudo apt-get install php5-xdebug
selectr:
remote: https://github.com/Mobius1/Selectr
license:
name: MIT
url: https://github.com/Mobius1/Selectr/blob/master/LICENSE
gpl-compatible: true
css:
theme:
https://cdn.jsdelivr.net/gh/mobius1/selectr@latest/dist/selectr.min.css: { type: external, minified: true }
js:
@cyberlex404
cyberlex404 / ajaxForm.php
Created November 3, 2017 12:05 — forked from alexey-kuznetsov/ajaxForm.php
Working ajax form with multiple commands in response
/**
* AJAX process step
*/
public function processStep(array &$form, FormStateInterface $form_state) {
$ajax_response = new AjaxResponse();
$ajax_response->addCommand(new ReplaceCommand(
'h1.page-title',
'<h1 class="page-title">' . $this->getTitle() . '</h1>'
));
@cyberlex404
cyberlex404 / trydevper.py
Created April 23, 2017 21:13 — forked from mikl745/trydevper.py
true reshenie
i = int(input())
a = [int( input()) for x in range(i)]
listDel = []
def delit(n):
w = []
for i in range(1,n // 2 + 1):
if n % i == 0:
w.append(i)
w = int(input())
a = [int( input()) for x in range(w)]
y = []
w = []
def delit(n):
for i in range(1,n+1):
if n % i == 0:
w.append(i)
return w
print(dilit(min(a))
@cyberlex404
cyberlex404 / dev.py
Last active April 10, 2017 21:57 — forked from mikl745/dev.py
stroka = input() # Мы читаем ВСЮ строку в переменную
#stroka = 'bye bye.'
mywords = stroka[0:-1].split() # разделяем split() строку без последнего символа '.'
min = len(mywords[0]) + len(mywords[1])
res = mywords[0] + ' ' + mywords[1]
for i in range(1, len(mywords)-1):
cur = len(mywords[i]) + len(mywords[i+1])
if(cur < min):
res = mywords[i] + ' ' + mywords[i+1]
min = cur
@cyberlex404
cyberlex404 / Drupal 8 Composer Example
Created March 16, 2017 18:03 — forked from mariagwyn/Drupal 8 Composer Example
Composer build file for a Drupal 8 site
{
"name": "Drupal 8 Composer Build",
"description": "Project json for a Drupal 8 sites",
"type": "project",
"require": {
"composer/installers": "^1.0.20",
"drupal-composer/drupal-scaffold": "^2.0.0",
"cweagans/composer-patches": "^1.5.0",
"drupal/core": "~8",
"drupal/lightning": "~8.1",