Skip to content

Instantly share code, notes, and snippets.

@andiskiy
andiskiy / git_remove_old_branches.rb
Created April 26, 2022 14:30 — forked from bacrossland/git_remove_old_branches.rb
Ruby script for removing old local and remote git branches
#!/usr/bin/ruby
branches = `git branch --list `
branches.gsub!('\n')
branches_arr = branches.split
# Removing from the branches_arr the branches you want to keep.
# Add or remove branches from here based on your need.
branches_arr.delete('*')
# frozen_string_literal: true
module Rcon
class Base
attr_reader :host, :game_session
class << self
def call(game_session)
new(game_session).call
end
HTTPClient hHTTPClient = new HTTPClient("https://lvl.io/api/v1/servers");
JSONObject hJSONObject = new JSONObject();
hJSONObject.SetInt("score_first_team", g_iScores[0]);
hJSONObject.SetInt("score_second_team", g_iScores[1]);
char sID[64];
for (int i = 1; i <= MaxClients; ++i)
{
@andiskiy
andiskiy / test task
Last active November 25, 2019 06:44
users table:
Table Users {
Id,
Name
}
1. Policies
an example of:
reboot_system - "Allow user to reboot system",
write_to_file - "Allow user write files",
@andiskiy
andiskiy / Rails Singleton Model
Created November 18, 2019 12:45 — forked from thejbsmith/Rails Singleton Model
Rails Singleton Model
Rails Singleton Model
Taken from:
http://stackoverflow.com/questions/399447/how-to-implement-a-singleton-model/12463209#12463209