Skip to content

Instantly share code, notes, and snippets.

@Enapiuz
Enapiuz / gruvbox.itermcolors
Created July 28, 2023 12:48
iTerm better gruvbox theme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.15686133503913879</real>
@Enapiuz
Enapiuz / theme.json
Created July 27, 2023 18:15
Mattermost Gruvbox Theme
{"awayIndicator":"#fabd2f","buttonBg":"#689d6a","buttonColor":"#ebdbb2","centerChannelBg":"#3c3836","centerChannelColor":"#ebdbb2","codeTheme":"monokai","dndIndicator":"#d24b4e","errorTextColor":"#fb4934","linkColor":"#83a598","mentionBg":"#b16286","mentionBj":"#b16286","mentionColor":"#fbf1c7","mentionHighlightBg":"#d65d0e","mentionHighlightLink":"#fbf1c7","newMessageSeparator":"#d65d0e","onlineIndicator":"#b8bb26","sidebarBg":"#282828","sidebarHeaderBg":"#1d2021","sidebarHeaderTextColor":"#ebdbb2","sidebarTeamBarBg":"#17191a","sidebarText":"#ebdbb2","sidebarTextActiveBorder":"#d65d0e","sidebarTextActiveColor":"#fbf1c7","sidebarTextHoverBg":"#d65d0e","sidebarUnreadText":"#fe8019"}
@Enapiuz
Enapiuz / rule.json
Last active May 17, 2023 07:50
Karabiner: Left Command -> ENG, Left Option -> RU
{
"description": "L_CMD -> ENG, L_OPT -> RU",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_command",
"modifiers": {
"optional": [
"any"
@Enapiuz
Enapiuz / script.js
Created February 13, 2022 00:42
Planet finder
/**
To find proper planets for PI easier.
Works for pages like https://evemaps.dotlan.net/region/Heimatar/planets
Just change needed planets in neededPlanets array.
*/
$.find("table tr").forEach((elem) => {
// Temperate - 3
// Ice - 4
// Gas - 5
@Enapiuz
Enapiuz / main.ex
Last active February 14, 2019 15:42
Elixir vs Go
with(
{:ok, data} <- File.read "testdata/hello",
{:ok, config} <- Poison.decode data,
{:ok, result} <- Peka.do_something config
) do
IO.puts result
else
{:error, :enoent} ->
IO.puts "file not found"
{:error, :peka_mega_error} ->
#!/bin/bash
# Copyright 2017 Théo Chamley
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
# to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or
@Enapiuz
Enapiuz / grid.css
Created April 22, 2016 15:51
Mega grid
@media (min-width: 30em) {
.row { width: 100%; display: table; table-layout: fixed; }
.col { display: table-cell; }
}
@Enapiuz
Enapiuz / sum.php
Created March 23, 2016 22:32
php-gmp sum
<?php
/**
* Need php-gmp for work
*/
$numbers = [
'77863642434703028237682634582217333171107742958891',
'13803248561193268352849339467273586188719937714737',
'44224983195978765477621123627619455875331891277366',
@Enapiuz
Enapiuz / 1-Explanations.md
Created February 22, 2016 19:06 — forked from danvbe/1-Explanations.md
A way to integrate FosUserBundle and HWIOAuthBundle

I have managed to install this… and make it work. I implemented it for Facebook and Google, but you can extend it. My solution it is mostly as described in #116, with a bit of more code presented. The key aspects that lack in the #116 presentation (IMO) are:

  • the registration as service of your custom FOSUBUserProvider (with the necessary parameters)
  • set the service for oauth_user_provider in the security.yml with your custom created service

Here are the steps:

  1. Routing. In routing.yml I have added all the routes for both bundles.
  2. Configuration. I have set the config.yml mostly as it is presented in the HWIOAuthBundle.
  3. Security. I have set the security.yml mostly as it is presented in the HWIOAuthBundle (though my routes are using /login pattern, not /connect). Also, the oauth_user_provider is set for my custom service.
_log_pskb(date_created,link_id,logname,log)
account(id,uid,sum)
account_attach(account_id,file_id,name,orig_name)
account_transaction(user_id,yd)
activate_service(code,email,data)
admin_log_users(user_id,log_id,last_comment_view)
annoy(ip,last_req)
articles(title,short,msgtext,sign,logo,link)
articles_comments(from_id,parent_id,from_ip,created_time,article_id,msgtext,youtube_link)
articles_comments_files(comment_id,file_id,small,inline,temp)