Skip to content

Instantly share code, notes, and snippets.

View shunix's full-sized avatar
:electron:
Focusing

王锐 shunix

:electron:
Focusing
View GitHub Profile
@shunix
shunix / JetbrainsEvaluationReset_2020.py
Created July 11, 2023 06:56 — forked from mreyesv/JetbrainsEvaluationReset_2020.py
[Activate] A Python Script To Reset The Evaluation License Of These Jetbrains Products Released In 2020 Or Later (IntelliJIdea, CLion, Rider, PyCharm, RubyMine, GoLand )
# Reset Jetbrains 2020 Products
import glob
import os
import winreg
from os import path
from os.path import expanduser
home = expanduser("~")
newJetbrainsHome = path.join(home, "AppData\Roaming\JetBrains")
#coding=utf-8
#!/usr/bin/python
'''
author:jaffer tsao
time:2015-3-29
'''
import httplib2
import urllib
import threadpool
APP_ABI := armeabi-v7a
APP_BUILD_SCRIPT := ./Android.mk
APP_STL := stlport_static
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := leveldb
LOCAL_SRC_FILES := \
db/builder.cc \
db/c.cc \
db/db_impl.cc \
db/db_iter.cc \
EXPRESS WITH SEQUELIZE
Well, as this guy said is impossible to put your models in different files due to circular references and multiple sequelize instantiation(?). So, creating a single file is mandatory in order to create complex relationships.
But, you can fix this by putting your models data in different files but setting up sequelize in a single module which loads all the model definitions and holds all the model classes. Obviously, you must have this module as a singleton.
The idea is to have something like this for your model files:
Hello.js:
//Getting the orm instance
@shunix
shunix / MediaFille.java
Created November 11, 2015 06:08
Bypass sdcard write restriction in Android Kitkat
/*
* Copyright (C) 2014 NextApp, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language
/* ___====-_ _-====___
* _--^^^#####// \\#####^^^--_
* _-^##########// ( ) \\##########^-_
* -############// |\^^/| \\############-
* _/############// (@::@) \\############\_
* /#############(( \\// ))#############\
* -###############\\ (oo) //###############-
* -#################\\ / VV \ //#################-
* -###################\\/ \//###################-
* _#/|##########/\######( /\ )######/\##########|\#_

Create Git Mirror from SVN Repository

This guide will demonstrate how to mirror an SVN into a Git repo. You're the target audience if you're an SVN user, just getting started with Git and need to coax your project team over to Git.

The branching scenario has been simplified for clarity.

References

@shunix
shunix / index.js
Created August 21, 2014 10:59 — forked from edokeh/index.js
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
@shunix
shunix / android-boost.sh
Created December 24, 2013 15:20
Universal Script for Android Phone This universal script boost RAM performance. This universal script mounts all partition as NOATIME This universal script lessen lags on selected applications (MMS / Handcent / DialerOne) This universal script enhances deadline scheduler This universal script performs background process to check screen state
#!/system/bin/sh
#remounting the file systems with noatime and nodiratime flags to save battery and CPU cycles
for k in $(busybox mount | grep relatime | cut -d " " -f3)
do
sync
busybox mount -o remount,noatime,nodiratime $k
done