Skip to content

Instantly share code, notes, and snippets.

View mokiding's full-sized avatar
👻
Hunting bugs like Ghost Buster !

Coder mokiding

👻
Hunting bugs like Ghost Buster !
  • Behind Greatest Firewall of China
View GitHub Profile
@mokiding
mokiding / mojave.xml
Created July 1, 2018 06:08 — forked from trongthanh/mojave.xml
macOS Mojave dynamic background re-implement as GTK+ background slideshow. Background images are changed to reflect the time of the day.
<!-- Intruction:
- Download and unzip Mojave dynamic background here: https://files.rb.gd/mojave_dynamic.zip
- Fix the path to the background images
- Use gnome-tweaks tool to select this XML as wallpaper
-->
<background>
<starttime>
<year>2014</year>
<month>01</month>
<day>11</day>
@mokiding
mokiding / gource.sh
Last active March 4, 2018 23:31 — forked from cgoldberg/gource.sh
Generate a MP4 Video for your Git project commits using Gource!
# install bzr and gource
# get a branch of Mir's trunk code
# create gource video
$ sudo apt-get install bzr gource
$ bzr branch lp:mir
$ cd mir
$ gource \
-s .06 \
@mokiding
mokiding / web-service-soap-client-server-php.md
Created February 22, 2018 21:14 — forked from umidjons/web-service-soap-client-server-php.md
Simple Web service - SOAP Server/Client in PHP

Simple Web service - SOAP Server/Client in PHP

Implementation of the SOAP server - server.php:

<?php
// turn off WSDL caching
ini_set("soap.wsdl_cache_enabled","0");

// model, which uses in web service functions as parameter
@mokiding
mokiding / web-service-soap-client-server-php.md
Created February 22, 2018 21:14 — forked from umidjons/web-service-soap-client-server-php.md
Simple Web service - SOAP Server/Client in PHP

Simple Web service - SOAP Server/Client in PHP

Implementation of the SOAP server - server.php:

<?php
// turn off WSDL caching
ini_set("soap.wsdl_cache_enabled","0");

// model, which uses in web service functions as parameter
@mokiding
mokiding / raspberry_pi_optimization.md
Last active February 16, 2018 06:59 — forked from cybear/raspberry_pi_optimization.md
I read up a little on performance optimization for the Raspberry Pi, and gathered the links before they disappear from my short term memory.

Raspberry Pi general optimization

  • Use a class 10 SD card for best speed. The USB bus can't come much higher than 30MB/s so you don't have to buy any extremely fast ones though. Not all cards are compatible, check the compatibility list: http://elinux.org/RPi_SD_cards
  • Use the HardFloat version of Raspbian instead of the SoftFloat. HF has much faster floating point operations - however SF is required for running Java. So it's either Java or performance, like normal.
  • The official Raspbian image gives low network speeds: http://elinux.org/RPi_Performance#NIC
  • A graphics driver by Simon / teh_orph is using hardware acceleration for some instructions: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=63&t=28294 installation instructions: http://elinux.org/RPi_Xorg_rpi_Driver
  • The firmware can be upgraded which gives, among other things, better GPU performance.
@mokiding
mokiding / gist:d20d544bf38abe12fdc5b57c9d87acae
Created August 1, 2017 05:08 — forked from marty-wang/gist:5a71e9d0a6a2c6d6263c
Compile and deploy React Native Android app of Release version to device.
Disclaimer: The instructions are the collective efforts from a few places online.
Nothing here is my original. But I want to put them together in one place to save people from spending the same time as I did.
First off, bundle.
==================
1. cd to the project directory
2. Start the react-native packager if not started
3. Download the bundle to the asset folder:
curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"
@mokiding
mokiding / ubuntu-php-development-environment.md
Last active August 29, 2015 14:27 — forked from DaRaFF/ubuntu-php-development-environment.md
Ubuntu php development environment

#Introduction If you're a php developer on ubuntu, there comes the time where you have to install/reinstall your system. I did it already a few times and i decided to write down the steps for a typical web developer stack with php. This is for a developer machine and not for a live environment!

I hope it helps you too!

fyi @mheiniger and me started with an installer here: https://github.com/mheiniger/webdev-setup

#include <a_samp>
#include <streamer>
#include <zcmd>
#include <sscanf2>
#include <foreach>
// EDIT THESE DEFINES TO WHATEVER SUITS YOU
#define USE_SYNC true // respawns the vehicle after you hit the cancel/finish button so it syncs with the world, disable this if you're mapping on a hill and the vehicle accidentally drives down the hill.
#define MAX_VEHICLES_PER_PLAYER (50) // maximum amount of vehicles 1 player can spawn
#define LABEL_COLOR 0xFFFFFFFF // Vehicle's label color
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key