Skip to content

Instantly share code, notes, and snippets.

@somecuitears
somecuitears / termux-url-opener
Created November 19, 2019 11:33 — forked from LordH3lmchen/termux-url-opener
termux-url-opener
#!/data/data/com.termux/files/usr/bin/zsh
#
# This is a termux-url-opener script to do diffrent tasks on my Android phone
#
url=$1
echo "What should I do with $url ?"
echo "y) download youtube video to movies-folder"
echo "u) download youtube video and convert it to mp3 (music-folder)"
echo "s) download with scdl (soundcloud)"
@somecuitears
somecuitears / Hibernate.md
Last active June 22, 2017 13:36
Hibernate Configuration with Spring

Hibernate Configuration

Create Spring MVC project

  1. Click on Project root and Add Framework Support... or download Hibernate_release.zip(ORM) from http://hibernate.org
  2. Click Hibernate from list and Select download and ok
  3. Open Module Setting and inside Modules select hibernate and add configuration file "hibernate.cfg.xml"
  4. The hibernate configuration file will be added to src > resources. Open the file and paste the following codes if you are using MYSQL database
        <session-factory>
               <!-- Database connection settings -->
               <property name="connection.driver_class">com.mysql.cj.jdbc.Driver</property>
@somecuitears
somecuitears / .htaccess
Last active September 14, 2017 18:40
Codeigniter
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /codeigniter/
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
@somecuitears
somecuitears / default
Last active April 24, 2017 08:36 — forked from dtomasi/default
Brew Nginx PHP7
server {
listen 80;
server_name localhost;
root /Users/YOUR_USERNAME/Sites;
access_log /Library/Logs/default.access.log main;
location / {
include /usr/local/etc/nginx/conf.d/php-fpm;
}
@somecuitears
somecuitears / springboot.md
Last active May 8, 2017 12:40
Spring Boot in IntelliJ

Spring Boot

  1. Create New Project > Spring Initializer
  2. Set Initializer Service URL to https://start.spring.io
  3. Enter Group, Artifact and Type -> Gradle Project
  4. Select Required Dependencies
    • AOP
    • Web
    • JDBC
    • JPA
  5. Import Module dialog will appear check auto-import, use default gradle wrapper then click ok
@somecuitears
somecuitears / Gradle SpringMVC.md
Last active January 27, 2020 16:05
Spring MVC from Gradle in IntelliJ

Creating Gradle Project

  1. Create New Project

  2. Select Java and Web from the Option

  3. You will be asked to provide GroupID and ArtifactID

  • GroupID: it will identify your project uniquely across all projects. (E.g. com.project.model | com.project.plugins)
@somecuitears
somecuitears / gradle installation.md
Last active March 27, 2017 10:21
Gradle Installation
@somecuitears
somecuitears / chocolate.md
Last active March 27, 2017 10:23
Package manager for windows

Installing Chocolatey

  1. Open Powershell in admin mode from start menu.
  2. Allow running sript on powershell using following code
Set-ExecutionPolicy RemoteSigned
  1. Type YES and press enter.
  2. Paste following code to begin installing Chocolatey
@somecuitears
somecuitears / Spring.md
Last active May 9, 2017 04:03
Spring on Idea IntelliJ Ultimate

Create Basic Spring MVC Project

  1. Create New Project

  2. Select Spring Framework and check the Spring MVC and JavaEE Web application

  3. Find web.xml and change

<url-pattern>*.form</url-pattern>
@somecuitears
somecuitears / macOS.md
Last active April 3, 2017 04:58
Usefull macOS tweaks

Hidden Files and Folders

Open terminal and paste following codes to:

Hide files or folder

chflags hidden <file/folder>

Show Hidden files and folders