Skip to content

Instantly share code, notes, and snippets.

@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 / .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 / 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 / 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)"