Skip to content

Instantly share code, notes, and snippets.

View alroniks's full-sized avatar

Ivan Klimchuk alroniks

View GitHub Profile
@ravanscafi
ravanscafi / _readme.md
Last active June 22, 2019 14:42
Proper way to use LiveReload with Laravel Elixir

Proper way to use LiveReload with Laravel Elixir

Features

  • It works without touching laravel-elixir source files, so it will not break on updates.
  • It runs only on watch task, so that when you run other tasks, livereload will not start and hang the console.
  • It performs soft-reloads on CSS changes, instead of a full page reload.

Instructions

  1. npm install gulp-livereload if you still don't have it.
  2. Create an elixir.json file on the root of your project (where your gulpfile.js is located)
@afilhodaniel
afilhodaniel / gist:09a1df8eafeabe1584c6
Last active November 12, 2020 10:20
Upload photos to Instagram via private API with Ruby
class InstagramPrivateController < ApplicationController
def initialize(username, password, photo, caption)
@username = username
@password = password
@photo = photo
@caption = caption
@cookiepath = Tempfile.new('cookies').path
@user_agent = generate_user_agent()
@greabock
greabock / Волшебный Eloquent.md
Last active April 15, 2024 12:21
Построение моделей

#Волшебный Eloquent. ##Дисклеймер Данный материал абсолютно не претендует на уникальность, и не является попыткой открыть для кого-то Америку. Все ниже изложенное (прямо или косвенно) можно легко почерпнуть из официального мануала. А для чего же оно тогда написано? Попытка подать информацию в чуть более развернутом виде, систематезировать собственные знания, и снять острый приступ графоманства. Если это вдруг окажется кому-то полезным, то мне будет приятно.

##Введение TL;DR
Так уж сложилось, что слоняясь по "интернетам", в поисках сообщников в ограблении банка единомышленников в изучении framework'a Laravel, я забрел в чат хоть и праздно прозябающего, но (стараниями Алексея) живого и дружелюбного Cообщества, и плотно там осел. А через какое-то время заметил, что отвечаю на чьи-то вопросы гораздо чаще, чем задаю их. Хотя мой замысел был иной: изначально, я хотел добраться до "знающих людей" и, как вампир, высосать через чат все и

@StefanWallin
StefanWallin / README.md
Last active January 15, 2022 06:22 — forked from konklone/ssl.rules
nginx ssl config with multiple SNI vhosts and A+ SSL Labs score as of 2014-11-05

Configuring nginx for SSL SNI vhosts

Gotchas

Remarks

  • My version of konklones SSL config does not have SPDY support(my nginx+openssl does not support it)
  • You need a default ssl server (example.org-default.conf).
  • Some SSL-options have to be unique across your instance, so it's easier to have them in a common file(ssl.conf).
@christianseel
christianseel / introRTE
Created August 14, 2014 14:52
RTE for introtext #modx
<?php
// Add RTE for introtext if richtext option is enabled for the resource
// check "OnDocFormRender" event
$modx->regClientStartupHTMLBlock('<script>Ext.onReady(function() {
if(MODx.loadRTE) MODx.loadRTE("modx-resource-introtext");
});</script>');
@Mark-H
Mark-H / compare.lexicon.php
Created June 19, 2014 12:50
compare.lexicon.php - A super useful script for people that want to update translations for MODX (or MODX Extras) and need to get a good at a glance view of the changes. Got it from the forums somewhere in the past, but can't find the original source now. It probably changed a bit over the years too.
<?php
$default = realpath(dirname(__FILE__).'/core/lexicon/en').'/';
$local = realpath(dirname(__FILE__).'/core/lexicon/nl').'/';
$showSame = false;
// find default files
$theFiles = array();
if($handle = opendir($default)) {
while(false !== ($file = readdir($handle))) {
@mrryanjohnston
mrryanjohnston / Dockerfile
Created February 23, 2014 18:50
nginx with php5-fpm on Ubuntu 13.10 Dockerfile
FROM ubuntu:13.10
RUN apt-get update
# nginx
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install nginx
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
# php5-fpm
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install php5-fpm
@JeffreyWay
JeffreyWay / .vimrc
Last active January 22, 2024 11:42
My .vimrc file
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@krebernisak
krebernisak / git log between tags
Created September 25, 2013 10:04
All commits between two tags/commits
git log [TAG1]..[TAG2] --oneline