Skip to content

Instantly share code, notes, and snippets.

Ilgrim Ilgrim

Block or report user

Report or block Ilgrim

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Ilgrim
Ilgrim / vimrc
Last active Jul 19, 2019 — forked from seubert/vimrc
View vimrc
source ~/dotfiles/vim/bundle/pathogen.vim
call pathogen#infect('~/dotfiles/vim/bundle')
call pathogen#helptags()
" To use this file, source it in your own personal .vimrc file (``source
" <filename>``) or, if you don't have a .vimrc file, you can just symlink to it
" (``ln -s <this file> ~/.vimrc``). All options are protected by autocmds
" (read below for an explanation of the command) so blind sourcing of this file
@Ilgrim
Ilgrim / ctags_autocmd.vim
Last active Jul 18, 2019 — forked from rafeco/ctags_autocmd.vim
My Vim ctags configuration
View ctags_autocmd.vim
function! DelTagOfFile(file)
let fullpath = a:file
let cwd = getcwd()
let tagfilename = cwd . "/tags"
let f = substitute(fullpath, cwd . "/", "", "")
let f = escape(f, './')
let cmd = 'sed -i "/' . f . '/d" "' . tagfilename . '"'
let resp = system(cmd)
endfunction
@Ilgrim
Ilgrim / test.sh
Created Jul 15, 2019 — forked from arq5x/test.sh
Compress and then Decompress a string with zlib.
View test.sh
# compile
$ g++ zlib-example.cpp -lz -o zlib-example
# run
$ ./zlib-example
Uncompressed size is: 36
Uncompressed string is: Hello Hello Hello Hello Hello Hello!
----------
@Ilgrim
Ilgrim / index.py
Created Jul 1, 2019 — forked from FaztTech/index.py
Python Simple Discord Bot
View index.py
import discord
from discord.ext import commands
import datetime
from urllib import parse, request
import re
bot = commands.Bot(command_prefix='>', description="This is a Helper Bot")
@bot.command()
@Ilgrim
Ilgrim / client.js
Created Jun 17, 2019 — forked from crtr0/client.js
A simple example of setting-up dynamic "rooms" for socket.io clients to join
View client.js
// set-up a connection between the client and the server
var socket = io.connect();
// let's assume that the client page, once rendered, knows what room it wants to join
var room = "abc123";
socket.on('connect', function() {
// Connected, let's sign-up for to receive messages for this room
socket.emit('room', room);
});
@Ilgrim
Ilgrim / multihooks.py
Created Jun 13, 2019 — forked from carlos-jenkins/multihooks.py
Delegating script for multiple git hooks
View multihooks.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2015-2017 Carlos Jenkins <carlos@jenkins.co.cr>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
View __init__.py
default_app_config = 'cn.apps.users.config.UsersAppConfig'
@Ilgrim
Ilgrim / platformsh-php-redis-session-handler.php
Created Jun 9, 2019
How to dynamicaly configure Redis PHP session storage on PHP7.1 for Platform.sh standard hosting
View platformsh-php-redis-session-handler.php
/** How to dynamicaly configure Redis PHP session storage
* on PHP7.1 for Platform.sh standard hosting
*
* Related doc:
* https://docs.platform.sh/configuration/services/redis.html
* https://www.digitalocean.com/community/tutorials/how-to-set-up-a-redis-server-as-a-session-handler-for-php-on-ubuntu-14-04
*/
# Extract Redis information
$env = getenv('PLATFORM_RELATIONSHIPS');
@Ilgrim
Ilgrim / spec.md
Created Jun 8, 2019 — forked from ePirat/spec.md
Icecast Protocol specification
View spec.md

Icecast protocol specification

What is the Icecast protocol?

When speaking of the Icecast protocol here, actually it's just the HTTP protocol, and this document will explain further how source clients need to send data to Icecast.

HTTP PUT based protocol

Since Icecast version 2.4.0 there is support for the standard HTTP PUT method. The mountpoint to which to send the data is specified by the URL path.

@Ilgrim
Ilgrim / .vimrc
Created Apr 28, 2019 — forked from NickLaMuro/.vimrc
Set up Vim on Mac or Linux. curl https://raw.github.com/gist/1147370/vim.sh | sh
View .vimrc
"this is the cconfiguration file for linux and mac systems
"symlink this to your home folder as .vimrc
call pathogen#runtime_prepend_subdirectories(expand('~/.vim/bundles'))
call pathogen#helptags()
"call pathogen#runtime_append_all_bundles()
source ~/.vimrc_main
You can’t perform that action at this time.