Skip to content

Instantly share code, notes, and snippets.

View wellic's full-sized avatar

Valerii Savchenko wellic

View GitHub Profile
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#define CANARY "in_the_coal_mine"
struct {
char buffer[1024];
@wellic
wellic / .gitconfig
Last active August 29, 2015 14:16 — forked from robmiller/.gitconfig
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
@wellic
wellic / ubuntu-php-development-environment.md
Last active August 29, 2015 14:26 — forked from DaRaFF/ubuntu-php-development-environment.md
Ubuntu php development environment

#Introduction If you're a php developer on ubuntu, there comes the time where you have to install/reinstall your system. I did it already a few times and i decided to write down the steps for a typical web developer stack with php. This is for a developer machine and not for a live environment!

I hope it helps you too!

fyi @mheiniger and me started with an installer here: https://github.com/mheiniger/webdev-setup

@wellic
wellic / post.md
Last active August 29, 2015 14:26 — forked from kbond/post.md
Ubuntu LAMP Development Environment Setup

Install git:

sudo apt-get install git

Configure Git:

touch ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
git config --global user.name "Your Name"

git config --global user.email "Your Email"

@wellic
wellic / mvvm.html
Created February 18, 2016 06:47 — forked from smelukov/mvvm.html
Very simple MVVM (dynamic data binding) on JS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">
<h1>MVVM</h1>
# Redirection of port 80 to port 443
<virtualhost *:80>
ServerName redmine.domain.com
KeepAlive Off
RewriteEngine On
#RewriteCond %{HTTP_HOST} ^[^\./]+\.[^\./]+$
RewriteRule ^/(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
@wellic
wellic / gitcomenu.sh
Created June 6, 2016 16:21 — forked from alecthegeek/gitcomenu.sh
Make `git checkout <branch>` into a menu selection
OPS3=$PS3
echo There are multiple branchs in this repo. Please select the one you want to use
PS3='If you're not sure just choose "master" '
select br in $(git branch|sed -e '/^[* ] /s///'); do
[[ -n $br ]] && git checkout $br &&
break
done
PS3=$OPS3
@wellic
wellic / screenshot-to-dropbox.sh
Created July 6, 2016 12:55 — forked from Ajnasz/screenshot-to-dropbox.sh
Create screenshot to dropbox folder and copy it's dropbox link to clipboard
#!/bin/sh
DISPLAY=:0.0
DROPBOXPYPATH=/usr/bin/dropbox
XCLIP=/usr/bin/xclip
FILENAME=`date +shot-%Y-%m-%d-%H%M%S.png`
FULLPATH=$HOME/Dropbox/Public/Screenshots/$FILENAME
import -window root $FULLPATH
# Before Script
before_script:
- composer self-update
- composer install --prefer-dist > /dev/null
- cp .env.example .env
- php artisan key:generate
- php artisan migrate:refresh
# Services
services:
@wellic
wellic / .eslint.json
Created November 24, 2016 17:16 — forked from JoshTheWanderer/.eslint.json
A rough linting boilerplate
{
"extends": "airbnb",
"plugins": [
"react"
],
"env": {
"es6": true
},
"parserOptions": {
"ecmaVersion": 6,