Skip to content

Instantly share code, notes, and snippets.

View xCASx's full-sized avatar
🚀
Work it Harder, Make it Better, Do it Faster, Makes Us Stronger

Maxim Kolesnikov xCASx

🚀
Work it Harder, Make it Better, Do it Faster, Makes Us Stronger
View GitHub Profile
@xCASx
xCASx / TripAdvisorMapExtractor
Created November 22, 2019 09:19
Regex to extract information from TripAdvisor world map
.*\s+"lng": (?<lng>[-0-9]+.[0-9]+),\s+"lid": [0-9]+,\s+"flags": \[\s+(?<flags>"been"(,\s+"fave")*)\s+\],\s+"name": "(?<city>[\w\s]+),\s(?<country>[\w\s,]+)",\s+"lat": (?<lat>[-0-9]+.[0-9]+)\s.*
# init
$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/src
$ catkin_init_workspace
# Launch Gazebo simulator
$ cd ~/catkin_ws
$ catkin_make
$ source devel/setup.bash
$ roslaunch simple_arm robot_spawn.launch
@xCASx
xCASx / .bashrc
Last active August 31, 2016 05:13
Customized bash profile
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
# base-files version 4.2-3
# ~/.bashrc: executed by bash(1) for interactive shells.
@xCASx
xCASx / gist:1a40c3ff02e2098d245122dd94d2cb11
Created June 28, 2016 11:01
Add/remove SPARSE file attribute on windows (when set .iso image can't be mounted)
Все дело в атрибуте файла SPARSE (разреженный), при копировании он и снимается. Убрать его можно еще из командной строки:
убрать атрибут:
fsutil sparse setflag <полный путь к файлу> 0
проверить атрибут:
fsutil sparse queryflag <полный путь к файлу>
@xCASx
xCASx / client-config.wsdd
Created November 30, 2015 21:59
Axis1 log configuration
<?xml version="1.0" encoding="UTF-8"?>
<deployment name="defaultClientConfig" xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<handler name="log" type="java:org.apache.axis.handlers.LogHandler" >
<parameter name="LogHandler.fileName" value="axis1.log"/>
</handler>
<globalConfiguration>
<requestFlow>
@xCASx
xCASx / git_pull_rebase
Created October 27, 2015 18:41
Commands for git pull --rebase strategy by default
# Force all new branches to automatically use rebase
git config --global branch.autosetuprebase always
# This will tell git to always pull with rebase.
git config --global --bool pull.rebase true
# After these two commands ~/.gitconfig will look like this:
[branch]
autosetuprebase = always
[pull]
@xCASx
xCASx / MockitoTemplate
Created November 24, 2014 15:37
Mockito fixture template
/**
* Fixture for test.
*/
private static final class Fixture {
@Mock
CustomManager customManager;
@Mock
CustomRepository repository;
@xCASx
xCASx / Oracle JDK for Ubuntu
Created November 4, 2014 12:15
Install Oracle JDK on Ubuntu
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
# If you have multiple java installed on your system, you can select with : sudo update-alternatives --config java
@xCASx
xCASx / Maven install DB driver to local repo
Created August 20, 2014 18:11
Maven install DB driver to local repo
mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.4 -Dpackaging=jar -Dfile=ojdbc6.jar -DgeneratePom=true
@xCASx
xCASx / Git ignore SSL check commands
Last active August 29, 2015 14:05
Git ignore SSL check commands
# Turn off global property
git config http.sslVerify false
# Turn off ssl check for current operation
git -c http.sslVerify=false clone https://domain.com/path/to/git