Skip to content

Instantly share code, notes, and snippets.

View dant3's full-sized avatar

Viacheslav Blinov dant3

View GitHub Profile
@max-potapov
max-potapov / makeall-ios.sh
Created August 30, 2013 11:39
makeall script for fetch, build and run webrtc for ios
#!/bin/sh
# gclient can be found here:
# git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
# don't forget modify .bashrc:
# export PATH="$PATH":`pwd`/depot_tools
function fetch() {
echo "-- fetching webrtc"
-J-Xmx4G
-J-XX:+UseConcMarkSweepGC
-J-XX:+CMSClassUnloadingEnabled
-J-Xss2M -Duser.timezone=GMT
-jvm-debug 5008
@agemooij
agemooij / README.md
Last active July 29, 2016 21:36
My SBT prompt config

My customized SBT shell prompt

Example screenshot

A heavily customied SBT shell prompt that shows the following information:

  • a handy marker to show you are in SBT
  • the current Git status (a clean working directory is green, a dirty one is yellow)
  • the current project, including the root project of a multi-project build

Requirements

@krmahadevan
krmahadevan / AmDependent.java
Created August 19, 2011 02:11
This class demonstrates on how to use AnnotationTransformer as a listener and inject group dependency on runtime. Here the problem statement is there are two classes AmDependent and AmIndependent. These two classes should be run sequentially but the test
import org.testng.annotations.Test;
@Test
public class AmDependent {
public void methodD() {
System.out.println(this.getClass().getSimpleName()
+ ".method D : Thread ID : " + Thread.currentThread().getId());
}
@dant3
dant3 / mvncolor.sh
Last active January 9, 2017 04:57 — forked from katta/mvncolor.sh
#!/usr/bin/env bash
# Formatting constants
BOLD=`tput bold`
UNDERLINE_ON=`tput smul`
UNDERLINE_OFF=`tput rmul`
TEXT_BLACK=`tput setaf 0`
TEXT_RED=`tput setaf 1`
TEXT_GREEN=`tput setaf 2`
TEXT_YELLOW=`tput setaf 3`
@viktorklang
viktorklang / reclaimWindows10.ps1
Created January 7, 2017 20:21 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Fork via https://github.com/Disassembler0 (different defaults)
##########
# Win10 Initial Setup Script
# Author: Disassembler <disassembler@dasm.cz>
# Version: 1.7, 2016-08-15
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/
# THIS IS A PERSONALIZED VERSION
# This script leaves more MS defaults on, including MS security features.
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1
@happysundar
happysundar / setup port forwarding to enable remote debugging in vagrant vm.md
Created January 30, 2014 07:36
Getting the remote debugger to work with a java process running in a vagrant vm

Vagrant vm network config

In the Vagrantfile, do :

  # Create a public network, which generally matched to bridged network.
  # Bridged networks make the machine appear as another physical device on
  # your network.
  config.vm.network :public_network
@agemooij
agemooij / 1. README.md
Last active September 26, 2018 13:19
Quick spray-routing authentication example

Extremely bare example of Spray routing authentication using session cookies and XSRF tokens

This code was quickly ripped out of an active project to serve as an example. It will not compile in any way!

Any questions? Add them to the comments!

Notes

  • the application uses a version of the cake pattern to compose the Spray routing application together from various traits
  • a lot of those traits should be pretty self-explaining based on their name but if requested I can paste them into this Gist
@viktorklang
viktorklang / InterruptibleCancellableFuture.scala
Last active June 1, 2020 13:45
Interruptible-Cancellable-scala.concurrent.Future
/*
Copyright 2018 Viktor Klang
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@bryanstern
bryanstern / OkHttpStack.java
Last active April 24, 2022 03:17
An OkHttp backed HttpStack for Volley
/**
* The MIT License (MIT)
*
* Copyright (c) 2015 Circle Internet Financial
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is