Skip to content

Instantly share code, notes, and snippets.

View billel-boudchicha's full-sized avatar

BillelNorm billel-boudchicha

  • BNK Technologies
  • Algeria
View GitHub Profile
@chandruark
chandruark / Autostart.java
Last active May 22, 2024 06:32
used to get Autostart option for Alarm Manager in Android
private void addAutoStartupswitch() {
try {
Intent intent = new Intent();
String manufacturer = android.os.Build.MANUFACTURER .toLowerCase();
String model= Build.MODEL;
Log.d("DeviceModel",model.toString());
switch (manufacturer){
case "xiaomi":
@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active June 7, 2024 20:53
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@torgeir
torgeir / react-scaled-file-upload.js
Created March 25, 2015 12:16
React scaled file upload
function resize (file, maxWidth, maxHeight, fn) {
var reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = function (event) {
var dataUrl = event.target.result;
var image = new Image();
image.src = dataUrl;
image.onload = function () {
@staltz
staltz / introrx.md
Last active July 15, 2024 15:43
The introduction to Reactive Programming you've been missing
@jugyo
jugyo / nginx.conf
Created September 27, 2012 09:02
nginx.conf to switch proxy for mobile
http {
upstream app-pc {
server 127.0.0.1:8001;
}
upstream app-mobile {
server 127.0.0.1:8002;
}
server {