Skip to content

Instantly share code, notes, and snippets.

View ksprwhite's full-sized avatar

Jonathan Andres ksprwhite

View GitHub Profile
@seanf
seanf / process.kt
Created August 23, 2017 02:12
Execute process from Kotlin
import java.lang.ProcessBuilder.Redirect
import java.util.concurrent.TimeUnit
fun String.runCommand(workingDir: File? = null) {
val process = ProcessBuilder(*split(" ").toTypedArray())
.directory(workingDir)
.redirectOutput(Redirect.INHERIT)
.redirectError(Redirect.INHERIT)
.start()
if (!process.waitFor(10, TimeUnit.SECONDS)) {
@fernandohu
fernandohu / Reading configuration files before application startup in Angular2 final release.md
Last active May 8, 2023 16:40
Reading configuration files before application startup in Angular2 final release

Reading data before application startup in Angular 2

In this demonstration I will show you how to read data in Angular2 final release before application startup. You can use it to read configuration files like you do in other languages like Java, Python, Ruby, Php.

This is how the demonstration will load data:

a) It will read an env file named 'env.json'. This file indicates what is the current working environment. Options are: 'production' and 'development';

b) It will read a config JSON file based on what is found in env file. If env is "production", the file is 'config.production.json'. If env is "development", the file is 'config.development.json'.

@sim642
sim642 / boost-windows.md
Last active February 7, 2024 16:43
Installing boost libraries for GCC (MinGW) on Windows

Installing boost libraries for GCC (MinGW) on Windows

Folder setup

  1. Extract downloaded boost source, e.g. C:\Program Files\boost_1_59_0.
  2. Create a folder for Boost.Build installation, e.g. C:\Program Files\boost-build.
  3. Create a folder within for building, i.e. C:\Program Files\boost_1_59_0\build.
  4. Create a folder for installation, e.g. C:\Program Files\boost.

GCC setup

  1. Open Command Prompt.
@Rod-Persky
Rod-Persky / CMakeLists.txt
Last active January 31, 2024 12:57
Example cmake for windows including auto copy dll
# _______ __ __ _______ ______ _______ _______ _______ ______ #
#| || | | || || | | _ || || || | #
#| _ || | | ||_ _|| _ || |_| ||_ _|| ___|| _ |#
#| | | || |_| | | | | | | || | | | | |___ | | | |#
#| |_| || | | | | |_| || | | | | ___|| |_| |#
#| || | | | | || _ | | | | |___ | |#
#|_______||_______| |___| |______| |__| |__| |___| |_______||______| #
# #
# Modern CMake practices and importing the QT scripts by adding it to #
# your module path makes things a lot better than it used to be #
@wbroek
wbroek / genymotionwithplay.txt
Last active February 12, 2024 03:22
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@llbbl
llbbl / awesome-php.md
Last active April 5, 2024 09:51 — forked from ziadoz/awesome-php.md
Awesome PHP Libraries and Resources

Awesome PHP

A list of amazingly awesome PHP libraries, resources and shiny things.

Categories

  • Composer
  • Composer Related
  • Frameworks
  • Micro Frameworks