Skip to content

Instantly share code, notes, and snippets.

View a1ex7's full-sized avatar

TAlex a1ex7

  • NDA
  • Kharkov
View GitHub Profile
@a1ex7
a1ex7 / laravel.js
Created June 12, 2019 06:32 — forked from JeffreyWay/laravel.js
Want to send a DELETE request when outside of a form? This will handle the form-creation bits for you dynamically, similar to the Rails implementation. (Requires jQuery, but doesn't have to.) To use, import script, and create a link with the `data-method="DELETE"` attribute.
/*
<a href="posts/2" data-method="delete"> <---- We want to send an HTTP DELETE request
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-confirm="Are you sure?">
*/
(function() {
@a1ex7
a1ex7 / acf-repeater-loop.php
Created April 12, 2018 11:51 — forked from ajithrn/acf-repeater-loop.php
Wordpress: acf repeater loop
<?php
/** Functions available
* have_rows()
* has_sub_field()
* get_sub_field()
* the_sub_field()
*/
?>
<?php if( have_rows( 'repeater_field_name' ) ): ?>
@a1ex7
a1ex7 / three.js
Created March 25, 2018 07:51 — forked from akella/three.js
basic three.js setup
import * as THREE from 'three';
var OrbitControls = require('three-orbit-controls')(THREE);
var camera, controls, scene, renderer, mesh;
<snippet>
<content><![CDATA[
<!-- begin $1 -->
<div class="$1">
$2
</div>
<!-- end $1 -->
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>di</tabTrigger>
@a1ex7
a1ex7 / create_laravel_app.sh
Created August 22, 2017 15:03 — forked from connor11528/create_laravel_app.sh
Create a new Laravel application
#!/bin/bash
laravel new $1
cd $1
composer install
yarn install
touch README.md
cp .env.example .env
git init
git add -A
@a1ex7
a1ex7 / ChromeExtensionGulp.js
Created July 29, 2017 12:46 — forked from TravelingTechGuy/ChromeExtensionGulp.js
Gulp file for building a Chrome Extension
'use strict';
//npm install gulp gulp-minify-css gulp-uglify gulp-clean gulp-cleanhtml gulp-jshint gulp-strip-debug gulp-zip --save-dev
var gulp = require('gulp'),
clean = require('gulp-clean'),
cleanhtml = require('gulp-cleanhtml'),
minifycss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
stripdebug = require('gulp-strip-debug'),
<!-- HTML -->
<a href="#" class="toggle-mnu hidden-lg"><span></span></a>
<!-- SASS -->
.toggle-mnu
display: block
width: 28px
height: 28px
margin-top: 14px
@a1ex7
a1ex7 / scroll-next.js
Last active June 26, 2017 14:25 — forked from agragregra/scroll-next.js
jQuery Scroll To Next Section
/* Button for scroll to next section */
$('.scroll-next').click(function() {
var cls = $(this).closest('.section').next().offset().top;
$('html, body').animate({scrollTop: cls}, 'slow');
});
@a1ex7
a1ex7 / gulpfile.js
Created March 25, 2017 16:27 — forked from agragregra/gulpfile.js
Jekyll, Browsersync and Gulp
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
rename = require('gulp-rename'),
clean = require('gulp-clean'),
concat = require('gulp-concat'),
notify = require('gulp-notify'),
Keymap (Windows Users):
[
{ "keys": ["alt+shift+f"], "command": "reindent" },
]
Settings:
{
"show_definitions": false,
"auto_complete": false,
"bold_folder_labels": true,