Skip to content

Instantly share code, notes, and snippets.

View NeonSalamander's full-sized avatar
:octocat:
Wear mjölnir and hail Thor

NeonSalamander NeonSalamander

:octocat:
Wear mjölnir and hail Thor
View GitHub Profile
@NeonSalamander
NeonSalamander / upsert.py
Created February 17, 2025 15:08 — forked from bhtucker/upsert.py
A demonstration of Postgres upserts in SQLAlchemy
"""
Upsert gist
Requires at least postgres 9.5 and sqlalchemy 1.1
Initial state:
[]
Initial upsert:
-- Source https://community.powerbi.com/t5/Desktop/how-to-build-a-calendar-table-with-date-and-time/m-p/241728
Календарь часы =
VAR calendTime = ADDCOLUMNS (
CROSSJOIN (
CALENDAR ( DATE ( 2019, 1, 1 ), DATE ( 2030, 12, 31 ) ),
UNION (
ROW ( "Время", TIME ( 1, 0, 0 ) ),
ROW ( "Время", TIME ( 2, 0, 0 ) ),
ROW ( "Время", TIME ( 3, 0, 0 ) ),
ROW ( "Время", TIME ( 4, 0, 0 ) ),
@NeonSalamander
NeonSalamander / xampp_php7_xdebug.md
Created May 20, 2020 10:28 — forked from odan/xampp_php7_xdebug.md
Installing Xdebug for XAMPP

Install RabbitMQ on CentOS 7

sudo yum -y install epel-release
sudo yum -y update

Install Erlang

Download repository

@NeonSalamander
NeonSalamander / main.go
Created May 12, 2019 01:18
golang mongodb faker
package main
import (
"context"
"fmt"
"log"
"github.com/bxcodec/faker"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"

Java

sudo apt update  
sudo apt install oracle-java8-installer  
sudo apt install oracle-java8-set-default  

scala

sudo apt-get remove scala-library scala 
@NeonSalamander
NeonSalamander / Steam-on-fedora.md
Created January 20, 2019 04:37 — forked from mattbell87/Steam-on-fedora.md
How to install Steam on Fedora

Installing Steam on Fedora

These instructions are currently for Fedora 24. I'll update them over the releases if anything changes.

Before you follow these, make sure you have RPM Fusion installed.

Open a terminal

Press the Win/Super key, type terminal and press Enter.

Upgrade to super user

@NeonSalamander
NeonSalamander / app.R
Created January 22, 2018 06:00
R loading data with empty values with conversion to NA
df <- read.csv(url, na.strings=c("", " ","NA"))
@NeonSalamander
NeonSalamander / init.lua
Created October 11, 2017 10:58
binding to CtrlR which will execute Kotlin for Micro
function kotlinrun()
local buf = CurView().Buf
if buf:FileType() == "kotlin" then
local filejar = string.gsub(buf.Path, ".kt", ".jar")
HandleShellCommand("kotlinc " .. buf.Path .. " -include-runtime -d " .. filejar .. " && java -jar " .. filejar, true, true)
end
end
BindKey("CtrlR", "init.kotlinrun")
@NeonSalamander
NeonSalamander / slack.php
Created July 12, 2017 00:54 — forked from stefanzweifel/slack.php
Slack.com Webhook Integration (PHP) - Simple snippet which tells you, how to build your payload array.
<?php
//Options
$token = 'YOUR_TOKEN_HERE';
$domain = 'YOUR_SLACK_DOMAIN_GOES_HERE';
$channel = '#general';
$bot_name = 'Webhook';
$icon = ':alien:';
$message = 'Your message';