Skip to content

Instantly share code, notes, and snippets.

View geocine's full-sized avatar
🤖
지식은 행동으로 번성하고, 게으르면 시들어간다.

Aivan Monceller geocine

🤖
지식은 행동으로 번성하고, 게으르면 시들어간다.
View GitHub Profile
@geocine
geocine / friendly_url.js
Created August 31, 2012 17:54
Friendly Url JS
function friendly_url(str,max) {
if (max === undefined) max = 32;
var a_chars = new Array(
new Array("a",/[áàâãªÁÀÂÃ]/g),
new Array("e",/[éèêÉÈÊ]/g),
new Array("i",/[íìîÍÌÎ]/g),
new Array("o",/[òóôõºÓÒÔÕ]/g),
new Array("u",/[úùûÚÙÛ]/g),
new Array("c",/[çÇ]/g),
new Array("n",/[Ññ]/g)
@geocine
geocine / gist:3568732
Created September 1, 2012 10:09
takeown icacls
takeown /f <foldername> /r /d y
icacls <foldername> /grant administrators:F /T
@geocine
geocine / git cheat
Last active March 16, 2019 04:39
git workflow
GIT
===
touch README.md # create file
git init # initialize/mark/track directory as a git repository
git status # show file status
git add README.md # mark a file to be tracked
git commit -m "first commit" # commit to local repository with commit message
git remote add origin git@github.com:geocine/try_git.git # add remote repository
git push -u origin master # push (-u changed files) to remote repository on a specific branch (master)
git pull origin master # pull from remote repository

Screencasting Framework

The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.

Why you should care about screencasting?

You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.

  1. Communicating more effectively - At Envy Labs we produce screencasts for our clients all the time. Whether it's demoing a new feature or for a presentation for an invester, they're often much more effective and pleasent than a phone call or screen sharing.
#!/bin/sh
### BEGIN INIT INFO
# Provides: deluge-daemon
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Daemonized version of deluge and webui.
#!/bin/bash
# sample only
sudo dpkg --configure -a
sudo apt-get install ntfs-3g
sudo mkdir -p /media/USBHDD1
sudo mount -t auto /dev/sda1 /media/USBHDD1
sudo apt-get install samba samba-common-bin
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.old
sudo echo "[Share name]
#!/bin/sh
# cron script for checking wlan connectivity
# change 192.168.1.1 to whatever IP you want to check.
IP_FOR_TEST="192.168.1.1"
PING_COUNT=1
PING="/bin/ping"
IFUP="/sbin/ifup"
IFDOWN="/sbin/ifdown --force"
NameVirtualHost *
<VirtualHost *>
DocumentRoot "D:/xampp/htdocs"
ServerName localhost
<Directory "D:/xampp/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
@geocine
geocine / EnumHelpers.cs
Last active March 16, 2019 04:41
EnumDropDownList and EnumHelpers
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Html;
namespace Geocine.Helpers
@geocine
geocine / rewrite-extenison
Created August 20, 2013 03:17
rewrite (.html <-> .htm) -> .php -> root
# rewrite .html to .htm only if .html does not exist and .htm exist
RewriteCond %{REQUEST_FILENAME} (.*)\.html$
RewriteCond %1\.html !-f
RewriteCond %1\.htm -f
RewriteRule ^(.*)\.html$ $1.htm [L]
# rewrite .htm to .html only if .htm does not exist and .html exist
RewriteCond %{REQUEST_FILENAME} (.*)\.htm$
RewriteCond %1\.htm !-f
RewriteCond %1\.html -f