Skip to content

Instantly share code, notes, and snippets.

View PoisonousJohn's full-sized avatar

Ivan Fateev PoisonousJohn

View GitHub Profile
{
"swagger": "2.0",
"info": {
"version": "v1",
"title": "Leaderboard API"
},
"basePath": "/",
"paths": {
"/api/Values": {
"get": {
@PoisonousJohn
PoisonousJohn / AppCrash.qml
Last active April 28, 2017 12:42
Causing a crash on qt 5.8
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.0
ApplicationWindow {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
@PoisonousJohn
PoisonousJohn / Example.cs
Created March 21, 2017 07:29 — forked from JohannesEH/Example.cs
How to make a non-nullable type wrapper in C#, today… (doesn't work, for blog)
public void DoStuff(object input)
{
if (input == null)
throw new ArgumentNullException("input");
// Method implementation...
}
@PoisonousJohn
PoisonousJohn / nodejs.sh
Created February 18, 2017 19:06 — forked from ted-piotrowski/nodejs.sh
Install latest NodeJS on Ubuntu ARM
sudo apt-get uninstall nodejs # uninstall nodejs 4.2.6
wget https://nodejs.org/dist/v6.6.0/node-v6.6.0-linux-armv7l.tar.gz # get latest ARM build
tar -xvf node-v6.6.0-linux-armv7l.tar.gz # extract it
sudo cp node-v6.6.0-linux-armv7l /etc/node6.6 # copy extracted file to /etc folder
sudo ln -s /etc/node6.6/bin/node /usr/bin/node # link the nodejs executable
sudo ln -s /etc/node6.6/bin/npm /usr/bin/npm # link the npm executable
node --version # should output v6.6.0
@PoisonousJohn
PoisonousJohn / visualstudiocode.sh
Created February 18, 2017 14:22 — forked from ted-piotrowski/visualstudiocode.sh
Visual Studio Code on ARM Debian Linux
# building Visual Studio Code Debian package on ARM
# get source code
git clone [email protected]:Microsoft/vscode.git
cd vscode
# build debian package
./scripts/npm.sh install --arch=armhf
./node_modules/.bin/gulp vscode-linux-arm-build-deb
@PoisonousJohn
PoisonousJohn / 77-modem-managers-arduino-leonardo.rules
Created February 11, 2017 14:53
Fixing serial port on ArcBotics Sparky / put under /etc/udev/rules
#
# adapted from freetronics by laurent mardi 11/08/2015
# from : http://www.freetronics.com.au/pages/leostick-getting-started-guide#linux_uploading
#
#-----------------------------------------------
# disable modem manager for usb arduino leonardo
#-----------------------------------------------
# new linux version check for modem after plug an usb cdc device
# this take time and after disable the cdc serial port.
#
@PoisonousJohn
PoisonousJohn / updateFiles.sh
Created February 7, 2017 15:08
Update modified timestamp of files by extension in bash
#!/bin/sh
for file in `find . -name "*.$1"`; do echo >> $file; done
@PoisonousJohn
PoisonousJohn / config.txt
Created January 3, 2017 12:05
How to get waveshare 7" touchscreen working on Raspberry Pi 2
# set current over USB to 1.2A
max_usb_current=1
# overscan to adjust image position
overscan_left=0
overscan_right=0
overscan_top=0
overscan_bottom=0
# HDMI config
@PoisonousJohn
PoisonousJohn / disableImageInlining.sh
Last active June 29, 2016 09:23
Disable Apple Mail Image Inlining
#!/bin/sh
defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes
@PoisonousJohn
PoisonousJohn / PostProcessBuildPlayer_iPadProIcon
Created June 8, 2016 06:25
Copy iPad Pro icon 83.5@2x (167x167) to the XCode project if Unity doesn't support this yet
#!/usr/bin/python
# This script adds ipad pro icon to xcode project. Icon should be located at path Assets/Icons/size@Scalex
import argparse
import json
import os
import shutil
import sys