Skip to content

Instantly share code, notes, and snippets.

View arogulin's full-sized avatar

Alexey Rogulin arogulin

  • Zeeto
  • San Diego, California
View GitHub Profile
@arogulin
arogulin / privacy.txt
Created December 3, 2023 03:52
Privacy Policy
View privacy.txt
# Privacy Policy
I'm not interested in collecting any personal information. I believe such information is yours and yours alone. I do not store or transmit your personal details, nor do I include any advertising or analytics software that talks to third parties.
# What Information Is Collected?
This application does not collect any personal information or connect to the internet.
@arogulin
arogulin / Jenkins-plugins-outage-workaround-when-using-helm-charts.md
Last active November 13, 2020 18:10
Jenkins plugins outage workaround when using helm chart
View Jenkins-plugins-outage-workaround-when-using-helm-charts.md

As Jenkins download center for plugins is down since November 12, you can modify your values for helm chart by adding the following initContainerEnv block:

master:
  initContainerEnv:
    - name: JENKINS_UC
      value: http://mirrors.jenkins-ci.org/updates/dynamic-stable-2.249.2/update-center.json
    - name: JENKINS_PLUGIN_INFO
      value: http://mirrors.jenkins-ci.org/updates/current/plugin-versions.json
 - name: JENKINS_UC_DOWNLOAD
@arogulin
arogulin / VortexRace3ForMac.md
Last active October 11, 2023 10:16
How to setup Vortex Race 3 keyboard for Mac and move Fn key to Home
View VortexRace3ForMac.md

How to setup Vortex Race 3 for Mac with latest (on 2020-01-05) firmare V1.02.05.

For better understanding we will use the following naming convention:

  [ L1 ][ L2 ][ L3 ][ Space ][ R1 ][ R2 ][ R3 ]
  1. Reset everything by pressing L3+R1 for 5 seconds. Left LED will blink white color while you're holding the keys. Release them after it stopeed blinking.
  2. Get into one of the programmable layers (R2+RShift) – I like red, the super bright laser LED is the least super annoying in red.
  3. Put the keyboard in Windows Mode (Pn+W), it's the least problematic one.
@arogulin
arogulin / profile-java-in-docker.md
Last active May 29, 2018 07:14
How to profile java app inside docker container on remote host protected by firewall
View profile-java-in-docker.md
  1. Restart the app with the following JVM arguments:
-Dcom.sun.management.jmxremote.port=9010
-Dcom.sun.management.jmxremote.rmi.port=9010
-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.local.only=false
View gist:d2875d6f8bcba4de8b95ecbda5e2d46a
On 64-bit JVM all objects will require a multiple of 8 bytes: 8, 16, 24, 32, 48, 56, 64, etc.
Empty String: 24 bytes
String itself:
24 bytes = 8 bytes "headers" + (4 bytes "size" + 4 bytes "hash" - not anymore since Java 8) + 4 bytes "value reference" + 4 bytes "padding to make 20 to become multiple of 8".
char[0]:
0 bytes = does not cost any memory for this string, because it's shared empty char array, used by all empty strings.
String with 3 chars: 48 bytes
String itself:
24 bytes = 8 bytes "headers" + 4 bytes "size" + 4 bytes "hash" + 4 bytes "value reference" + 4 bytes "padding to make 20 to become multiple of 8".
@arogulin
arogulin / gist:43e9a6d4768a302a8029891981224665
Last active May 9, 2018 01:37
Machine Learning Cheat Sheet
View gist:43e9a6d4768a302a8029891981224665
Pandas methods:
- df.info() - quick description about data and amount of non-null values.
- df['category_field'].value_counts() - shows all categories and how many rows share each category.
- df.describe() - show summary of numerical attributes.
- df.hist(bins=50, figsize=(20,15)) - plots a histogram for each numerical attribute.
- df.where(df['age'] < 100, 100, inplace=True) - where the condition is false - replaces the value with the second argument.
- df.mask(df['age'] > 100, 100, inplace=True) - the opposite of where().
- df.corr() - returns linear correlation matrix between every pair of attributes
cm = df.corr()
cm['some_attribte'].sort_values(ascending=False)