Skip to content

Instantly share code, notes, and snippets.

View azim-koshoiev's full-sized avatar
🎯
Focusing

Azim Koshoiev azim-koshoiev

🎯
Focusing
View GitHub Profile
@azim-koshoiev
azim-koshoiev / bot.rb
Created July 18, 2021 02:08 — forked from dideler/bot.rb
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#
wget -O /tmp/YaHei.Consolas.1.12.zip https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/uigroupcode/YaHei.Consolas.1.12.zip
unzip /tmp/YaHei.Consolas.1.12.zip
sudo mkdir -p /usr/share/fonts/consolas
sudo mv YaHei.Consolas.1.12.ttf /usr/share/fonts/consolas/
sudo chmod 644 /usr/share/fonts/consolas/YaHei.Consolas.1.12.ttf
cd /usr/share/fonts/consolas
sudo mkfontscale && sudo mkfontdir && sudo fc-cache -fv
@azim-koshoiev
azim-koshoiev / Ruby Database Url -> Config YAML
Created March 9, 2021 12:09 — forked from pricees/Ruby Database Url -> Config YAML
Rails database connection, url to yaml
#########################################################
#
# This method takes a db connection url and returns rails
# config YAML
#
##########################################################
require "uri"
require "yaml"
@azim-koshoiev
azim-koshoiev / ruby heroku-tips-and-tricks.md
Created March 8, 2021 20:25 — forked from rtanglao/ruby heroku-tips-and-tricks.md
heroku tips and trips to run ruby scripts
    * bundle install and then commit Gemfile.lock
    * heroku git:remote -a quiet-brushlands-1543
    * heroku run bundle exec ruby checkmongo.rb 
@azim-koshoiev
azim-koshoiev / urlencode.cpp
Created November 30, 2020 22:49 — forked from litefeel/urlencode.cpp
c++ urlencode
// http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/package.html#encodeURIComponent()
void hexchar(unsigned char c, unsigned char &hex1, unsigned char &hex2)
{
hex1 = c / 16;
hex2 = c % 16;
hex1 += hex1 <= 9 ? '0' : 'a' - 10;
hex2 += hex2 <= 9 ? '0' : 'a' - 10;
@azim-koshoiev
azim-koshoiev / curl.md
Created November 30, 2020 12:22 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@azim-koshoiev
azim-koshoiev / curl_jsoncpp_example.cpp
Created November 27, 2020 15:48 — forked from connormanning/curl_jsoncpp_example.cpp
Curl HTTP GET and JsonCpp parsing - basic functionality
#include <cstdint>
#include <iostream>
#include <memory>
#include <string>
#include <curl/curl.h>
#include <json/json.h>
namespace
{
@azim-koshoiev
azim-koshoiev / NERDTree.mkd
Created September 25, 2020 18:01 — forked from m3nd3s/NERDTree.mkd
My Vim Cheat Sheet

NERDTree

o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|

O.......Recursively open the selected directory..................|NERDTree-O|

@azim-koshoiev
azim-koshoiev / project-ideas01.md
Created March 21, 2020 19:10 — forked from MWins/project-ideas01.md
Back end Projects - list

Project Ideas

Ok. I'm going to list off some ideas for projects. You will have to determine if any particular idea is good enough to include in a portfolio. These aren't creative ideas. They likely already exist. Some are way too advanced while others are simplistic.

I will recommend to post any project you make to github and make a github project page for it. Explain in as much detail as possible how you made it, how it can be improved etc. Document it.

If you pick an advanced idea, setup a development roadmap and follow it. This will show some project management skills.

Another piece of advice for those who are design challenged. Use different front end frameworks and use different themes for those frameworks to provide appealing designs without looking like yet another bootstrap site.

@azim-koshoiev
azim-koshoiev / index.md
Created February 26, 2020 20:17 — forked from rstacruz/index.md
Rails models cheatsheet

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one