Skip to content

Instantly share code, notes, and snippets.

View LionZXY's full-sized avatar

Nikita Kulikov LionZXY

View GitHub Profile
@willurd
willurd / web-servers.md
Last active May 9, 2024 05:48
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@vidavidorra
vidavidorra / auto-deploy_documentation.md
Last active February 19, 2023 17:37
Auto-deploying Doxygen documentation to gh-pages with Travis CI

Auto-deploying Doxygen documentation to gh-pages with Travis CI

This explains how to setup for GitHub projects which automatically generates Doxygen code documentation and publishes the documentation to the gh-pages branch using Travis CI. This way only the source files need to be pushed to GitHub and the gh-pages branch is automatically updated with the generated Doxygen documentation.

Sign up for Travis CI and add your project

Get an account at Travis CI. Turn on Travis for your repository in question, using the Travis control panel.

Create a clean gh-pages branch

To create a clean gh-pages branch, with no commit history, from the master branch enter the code below in the Git Shell. This will create a gh-pages branch with one file, the README.md in it. It doesn't really matter what file is uploaded in it since it will be overwritten when the automatically generated documentation is published to th

@dsvoronin
dsvoronin / StarsView.kt
Last active September 2, 2020 10:53
Protools
import android.content.Context
import android.graphics.Canvas
import android.graphics.Color
import android.graphics.Paint
import android.util.AttributeSet
class StarsView(context: Context, attrs: AttributeSet) : TickView(context, attrs) {
data class Star(val x: Float,
val y: Float,
@application2000
application2000 / how-to-install-latest-gcc-on-ubuntu-lts.txt
Last active May 7, 2024 10:38
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
@sademidenko
sademidenko / Lecture2
Last active December 4, 2017 15:16
Смешанное занятие №2
yep
@sademidenko
sademidenko / http_request
Last active March 21, 2018 17:01
Обработка HTTP запросов
Yeah c'mon, c'mon now take the chance
@piotrplenik
piotrplenik / docker
Created March 24, 2017 09:00
Turn on Docker Remote API on Ubuntu (on port 2375)
# File: etc/default/docker
# Use DOCKER_OPTS to modify the daemon startup options.
#DOCKER_OPTS=""
DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4 -H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock"
@digitalhitler
digitalhitler / smali-cheatsheet.txt
Created September 4, 2018 21:20
Smali docs на русском
Небольшая помощь в Smali
(Будет дополняться)
#
Общая информация
#
Smali
Виды(Types)
Байт-код Dalvik имеет два основных класса типов, примитивные типы и ссылочные типы. Типы ссылок - это объекты и массивы, все остальное является примитивным.
@dovahkiin98
dovahkiin98 / AutoSizeText.kt
Created October 4, 2021 09:03
AutoSize text implementation in Jetpack Compose
import androidx.compose.foundation.layout.BoxWithConstraints
import androidx.compose.foundation.layout.BoxWithConstraintsScope
import androidx.compose.foundation.text.InlineTextContent
import androidx.compose.foundation.text.InternalFoundationTextApi
import androidx.compose.foundation.text.TextDelegate
import androidx.compose.material.LocalTextStyle
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
@ghettorce
ghettorce / amiibin2nfcdev.py
Last active September 2, 2023 12:26
Script for converting NTAG215 dumps (.bin) to Flipper NFC device files (.nfc)
#!/usr/bin/env python3
import sys
from os.path import splitext, basename
if not sys.argv[1:]:
sys.exit(f'Usage: {sys.argv[0]} dump.bin')
ntag_file = sys.argv[1]
nfc_file = splitext(ntag_file)[0] + '.nfc'