Skip to content

Instantly share code, notes, and snippets.

View dgk's full-sized avatar
🇬🇪

Dmitry Kuksinsky dgk

🇬🇪
View GitHub Profile
@dgk
dgk / README.md
Last active August 29, 2015 14:17 — forked from marcoslin/.gitignore
Encryption: From PyCrypto to CryptoJS

Encryption: From PyCrypto to CryptoJS

Sample code to encrypt using Python and decrypt in Javascript

@dgk
dgk / enchtml.py
Last active August 29, 2015 14:17 — forked from andres-erbsen/enchtml.py
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
from sys import stdin, stdout, stderr
from optparse import OptionParser
from os import urandom
from hashlib import sha256
from Crypto.Cipher import AES
from base64 import b64encode
@dgk
dgk / gist:6f84d780eac2a2b62321bd3298725b1c
Created June 8, 2017 10:50 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
#!/bin/bash
#By installing the Amazon Inspector Agent, you agree that your use is
# subject to the terms of your existing AWS Customer Agreement or other
# agreement with Amazon Web Services, Inc. or its affiliates governing your
# use of AWS services. You may not install and use the
# Amazon Inspector Agent unless you have an account in good standing with AWS.
# Copyright 2016 Amazon Web Services, Inc. or its affiliates. All Rights Reserved.
# Licensed under the terms of your existing AWS Customer Agreement
@dgk
dgk / submit.md
Created May 23, 2019 11:55 — forked from tanaikech/submit.md
Downloading Shared Files on Google Drive Using Curl

Downloading Shared Files on Google Drive Using Curl

When the shared files on Google Drive is downloaded, it is necessary to change the download method by the file size. The boundary of file size when the method is changed is about 40MB.

File size < 40MB

CURL

filename="### filename ###"
fileid="### file ID ###"
curl -L -o ${filename} "https://drive.google.com/uc?export=download&amp;id=${fileid}"
@dgk
dgk / how-to.md
Created November 16, 2019 23:39 — forked from reywood/how-to.md
How to get a stack trace from a stuck/hanging python script

How to get a stack trace for each thread in a running python script

Sometimes a python script will simply hang forever with no indication of where things went wrong. Perhaps it's polling a service that will never return a value that allows the program to move forward. Here's a way to see where the program is currently stuck.

Install gdb and pyrasite

Install gdb.

# Redhat, CentOS, etc
@dgk
dgk / heredoc.rb
Created January 27, 2020 13:17 — forked from zaiste/heredoc.rb
class String
def unindent
gsub(/^#{scan(/^\s*/).min_by{|l|l.length}}/, "")
end
end
def display
text = <<-TEXT.unindent
Lorem ipsum dolor sit amet,
consectetur adipisicing elit,
@dgk
dgk / .style.yapf
Created March 12, 2020 10:23 — forked from krnd/.style.yapf
(Python) yapf configuration file
# .style.yapf
#
# DESCRIPTION
# Configuration file for the python formatter yapf.
#
# This configuration is based on the generic
# configuration published on GitHub.
#
# AUTHOR
# krnd
@dgk
dgk / version-up.sh
Created June 22, 2020 13:51 — forked from OleksandrKucherenko/version-up.sh
Calculate Next Suitable Version Tag for Your Git based project
#!/usr/bin/env bash
## Copyright (C) 2017, Oleksandr Kucherenko
## Last revisit: 2017-09-29
# For help:
# ./versionip.sh --help
# For developer / references:
# https://ryanstutorials.net/bash-scripting-tutorial/bash-functions.php
# http://tldp.org/LDP/abs/html/comparison-ops.html