Skip to content

Instantly share code, notes, and snippets.

View denegny's full-sized avatar

Art denegny

  • developer
  • Ukranian, Donetsk
  • 12:45 (UTC +03:00)
View GitHub Profile
@denegny
denegny / ps1
Created June 26, 2023 19:32
powerShell VPN conn on/off
$vpnName = Get-VpnConnection | select -first 1 -ExpandProperty Name;
∙ $vpn = Get-VpnConnection -Name $vpnName;
∙ if($vpn.ConnectionStatus -eq "Disconnected"){
∙ rasdial $vpnName;
∙ }
∙ else {rasdial $vpnName /DISCONNECT;}
∙ Get-VpnConnection;
@denegny
denegny / environment.ex
Last active August 20, 2019 07:04
AutonomousCar ## lib/scenes/environment.ex
defmodule AutonomousCar.Scene.Environment do
use Scenic.Scene
require Logger
alias AutonomousCar.Math.Vector2
alias Scenic.Graph
alias Scenic.ViewPort
import Scenic.Primitives
@spec init(any, nil | keyword | map) ::
{:ok,
@denegny
denegny / price.sql
Last active February 11, 2019 12:18
last price & percent diff
-- PostgreSQL dialect
-- drop table if exist
-- drop table ttest;
--create new table
create table ttest
(
date_w date,
nname varchar(50),
@denegny
denegny / asdf_version_update.sh
Last active September 14, 2018 08:45
Bash script help update plugin versions in asdf
#!/bin/bash
# Gather constant vars
ASDF_PLUGIN=""
ASDF_NEW_PLUGIN_VERSION=""
# Declare script fuctions
# Delete other plugin versions
@denegny
denegny / new_repo.sh
Created March 24, 2018 16:54 — forked from dbb/new_repo.sh
Create a new Github repository from the command line using cURL
curl -F login=$( git config github.user ) -F token=$( git config github.token ) https://github.com/api/v2/yaml/repos/create -F name=$1
@denegny
denegny / gist:6495ca928602e911cb78c82f2b2412a6
Last active March 20, 2018 21:39
Video decoder gstreamer|1.0|xplayer|H.264 (Main Profile) - Missing plugin
(xplayer:13555): GStreamer-CRITICAL **: gst_tag_list_get_string_index: assertion 'GST_IS_TAG_LIST (list)' failed
** Message: Missing plugin: gstreamer|1.0|xplayer|H.264 (Main Profile) decoder|decoder-video/x-h264, level=(string)5, profile=(string)main, max-input-size=(int)539764 (H.264 (Main Profile) decoder)
/usr/lib/python3/dist-packages/sessioninstaller/core.py:47: PyGIWarning: Gst was imported without specifying a version first. Use gi.require_version('Gst', '1.0') before import to ensure that the right version gets loaded.
@denegny
denegny / read.md
Last active February 21, 2020 10:00
Disable ActiveRecord for Rails 4,5

If you are creating a new application, you can use -O to skip ActiveRecord:

rails new my_app -O

For existing applications:

  1. Remove database adapter gems from your Gemfile (mysql2, sqlite3, etc.)

  2. Change your config/application.rb