Skip to content

Instantly share code, notes, and snippets.

View mjschutz's full-sized avatar
🏠
Working from home

Mauro Joel Schütz mjschutz

🏠
Working from home
View GitHub Profile
@jjvillavicencio
jjvillavicencio / setup.sh
Last active May 26, 2024 18:37
Install Android SDK on Windows Bash (WSL)
cd /home/<user>/
sudo apt-get install unzip
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
unzip sdk-tools-linux-4333796.zip -d Android
rm sdk-tools-linux-4333796.zip
sudo apt-get install -y lib32z1 openjdk-8-jdk
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
printf "\n\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64\nexport PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.bashrc
cd Android/tools/bin
@ThibaultJanBeyer
ThibaultJanBeyer / read-only-couchdb.json
Created July 5, 2018 17:21
read only couchdb: add this to the design documents of the database you want to protect. Now, only users with role admin will be able to edit or add documents to this database.
{
"_id": "_design/auth",
"language": "javascript",
"validate_doc_update": "function(newDoc, oldDoc, userCtx) { if (userCtx.roles.indexOf('admin') !== -1) { return; } else { throw ({ forbidden: 'Only admins may edit the database' }); } }"
}
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active May 30, 2024 11:07
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@luyx2412
luyx2412 / google-drive.js
Last active July 14, 2021 13:03
React native login google, and google drive. Save storage and get again data when uninstall app.
/**
* Google Drive
* created by luyxtran264@gmail.com
*/
import React, { Component } from 'react';
import {
Platform,
StyleSheet,
Text,
@taoyuan
taoyuan / npm-using-https-for-git.sh
Last active May 27, 2024 16:32
Force git to use https:// instead of git://
# npm using https for git
git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://
# npm using git for https
git config --global url."git@github.com:".insteadOf https://github.com/
git config --global url."git://".insteadOf https://
@davidkpiano
davidkpiano / app.js
Created September 4, 2015 14:41
Simple way to namespace React components
import React from 'react';
import * as My from './components/my-components.js';
export default class App extends React.Component {
render() {
return (
<div>
<My.Foo />
<My.Bar />
cmake_minimum_required(VERSION 2.8.4)
project(so29595222)
find_package(PythonLibs REQUIRED)
include_directories(${PYTHON_INCLUDE_DIRS})
ADD_DEFINITIONS( -std=c++11 )
set(SOURCE_FILES python_threading_example_so29595222.cpp)
@willrstern
willrstern / node-ubuntu-upstart-service.md
Last active August 17, 2023 10:15
Run Node.js App as Ubuntu Upstart Service

###The Issue With Forever Forever is great for running node services, with a minor setback: the word "forever" doesn't apply to system reboots.

###The solution, run node apps as a system service logged in as root

vim /etc/init/node-app.conf

Contents for node-app.conf

@tamoyal
tamoyal / gist:10441108
Created April 11, 2014 04:39
Create super user and database user in Mongo 2.6
# Create your superuser
$ mongo
> use admin
> db.createUser({user:"someadmin",pwd:"secret", roles:[{role:"root",db:"admin"}]})
> exit
# Alias for convenience (optional and at your own risk)
$ echo 'alias mongo="mongo --port 27017 -u someadmin -p secret --authenticationDatabase admin"' >> ~/.bash_profile
$ source ~/.bash_profile
@rxaviers
rxaviers / gist:7360908
Last active June 2, 2024 16:48
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: