Skip to content

Instantly share code, notes, and snippets.

View BasicWolf's full-sized avatar

Zaur Nasibov BasicWolf

View GitHub Profile
@kemingy
kemingy / auto_deploy_docs.md
Last active March 21, 2020 21:19
Auto deploying docs to GitHub Pages with Travis CI

Auto-Deploying Documents to GitHub Pages with Travis CI

There is already some gists talks about this topic using bash. However, Travis now support deploy in .travis.yml , which is super easy to set up. (Deploying to GitHub Pages is experimental now [2018.07.25])

I will show you an example of Python & Sphinx.

Create .travis.yml File

Here is a python example.

@itzg
itzg / LoginWebFilter.java
Created April 22, 2018 13:10
Custom Spring WebFlux AuthenticationWebFilter
import org.springframework.http.HttpMethod;
import org.springframework.http.codec.ServerCodecConfigurer;
import org.springframework.security.authentication.ReactiveAuthenticationManager;
import org.springframework.security.web.server.authentication.AuthenticationWebFilter;
import org.springframework.security.web.server.util.matcher.ServerWebExchangeMatchers;
public class LoginWebFilter extends AuthenticationWebFilter {
private final ServerCodecConfigurer serverCodecConfigurer;
/**
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cryzed
cryzed / fix-infinality.md
Last active May 8, 2024 17:00
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@kleinron
kleinron / likewise_change_shell_to_fish.sh
Created March 14, 2016 13:05
change shell to fish when logged in via likewise open
# if you want to change the shell to something else
sudo lwregshell set_value '[HKEY_THIS_MACHINE\Services\lsass\Parameters\Providers\ActiveDirectory]' LoginShellTemplate /usr/local/bin/fish
sudo lwregshell set_value '[HKEY_THIS_MACHINE\Services\lsass\Parameters\Providers\Local]' LoginShellTemplate /usr/local/bin/fish
sudo lwsm refresh lsass
sudo lw-ad-cache --delete-all
@treyhunner
treyhunner / time_dict_merge.py
Last active November 3, 2023 08:13
Test performance of different dictionary merging functions in Python
"""
Results:
multiple_update: 33 ms
copy_and_update: 27 ms
dict_constructor: 29 ms
kwargs_hack: 33 ms
dict_comprehension: 33 ms
concatenate_items: 81 ms
union_items: 81 ms
@shesek
shesek / callable.coffee
Last active January 14, 2019 15:37
Decorate constructor functions, and have them return a callable object that delegates to a `callable()` method when invoked.
##########
### Moved to https://github.com/shesek/callable-klass
##########
"use strict"
# without strict mode, `this` defaults to window, so `(this?obj)`
# would always return window.
callable = (ctor) ->
@azproduction
azproduction / README.md
Created September 24, 2012 16:42
Распределенные вычисления на JavaScript - протокол

Базовые понятия

Кластер распределенных вычислений

Один или несколько серверов объединенных одной целью

Цель: Цель кластера распределенных вычислений

Глобальная задача на которую кластер выделяет свои ресурсы