Skip to content

Instantly share code, notes, and snippets.

View a1ex7's full-sized avatar

TAlex a1ex7

  • NDA
  • Kharkov
View GitHub Profile
@a1ex7
a1ex7 / A%20File%20Icon.sublime-settings
Last active October 21, 2019 20:18
ST3 Sync Settings
{
// A File Icon Preferences – User
// ================================================================
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// ! PLEASE RESTART SUBLIME TEXT FOR THESE CHANGES TO TAKE EFFECT !
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
}
@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;
@a1ex7
a1ex7 / Poloniex Depth Chart
Last active February 28, 2018 20:43
Poloniex Depth Chart
function depthChart(canvasId, data, dark) {
var c = document.getElementById(canvasId);
var ctx = c.getContext("2d");
var scaleFactor = backingScale();
if (scaleFactor > 1) {
if (c.style.width < 10) {
c.style.width = c.width;
c.style.height = c.height;
c.width = c.width * scaleFactor;
<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 / dark-theme.css
Created November 9, 2017 20:59
Dark theme 153 bytes
:root {
background-color: #fefefe;
filter: invert(100%);
}
* {
background-color: inherit;
}
img:not([src*=".svg"]), video {
filter: invert(100%);
}
@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