Skip to content

Instantly share code, notes, and snippets.

View appkr's full-sized avatar
🎯
Focusing

appkr appkr

🎯
Focusing
View GitHub Profile
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@sr75
sr75 / osx-homebrew-setup.md
Last active June 18, 2020 06:35
Mac Yosemite OSX - Homebrew (RVM/MySQL/Redis) setup

Mac Homebrew (RVM/MySQL/Redis) setup

Follow the steps below to setup a local development environment:

XQuartz

Recommended to download latest XQuartz

iTerm2

@b4oshany
b4oshany / sql_import.php
Created January 9, 2015 05:27
PHP PDO sql file import.
<?php
namespace libs\mysql;
class PDODbImporter{
private static $keywords = array(
'ALTER', 'CREATE', 'DELETE', 'DROP', 'INSERT',
'REPLACE', 'SELECT', 'SET', 'TRUNCATE', 'UPDATE', 'USE',
'DELIMITER', 'END'
);
@vitorbritto
vitorbritto / rm_mysql.md
Last active January 3, 2026 14:41
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

    brew remove mysql
    
@laracasts
laracasts / gist:f4a304232c1be6dbb4f8
Last active August 3, 2024 16:45
Laracasts PHPStorm theme.
@nostah
nostah / gist:d610459d50564c729c56
Created April 13, 2015 07:42
php swagger 2.0 api sample
<?php
use Swagger\Annotations as SWG;
/**
* @SWG\Swagger(
* basePath="/v1",
* host="api.local",
* schemes={"http"},
* produces={"application/json"},
@jwage
jwage / .php_cs
Last active April 14, 2025 19:32
php-cs-fixer git pre commit hook
<?php
return Symfony\CS\Config\Config::create()
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
->fixers([
'short_array_syntax',
'ordered_use',
])
;
@egoing
egoing / gist:1f14bbe0cba467ccacfb
Last active May 20, 2017 15:20
페이스북 자동 가입
auto_register = new Object();
auto_register.add_member = function(member_id, group_id, ignore, callback) {
x = new XMLHttpRequest();
x.onreadystatechange = function() {
if (x.readyState == 4) {
if (x.status == 200) {
if (callback)
callback(member_id, group_id);
console.log('success', member_id);
} else
@karpathy
karpathy / min-char-rnn.py
Last active January 5, 2026 08:33
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@sheck
sheck / seti.css
Created October 18, 2015 04:51
Seti UI Theme for Pygments highlighting (jekyll, github pages)
.highlight .hll { background-color: #ffffcc }
.highlight { background: #151718; color: #d4d7d6; background-color: #151718 }
.highlight .c { color: #41535b; background-color: #151718 } /* Comment */
.highlight .err { color: #d4d7d6; background-color: #151718 } /* Error */
.highlight .esc { color: #d4d7d6; background-color: #151718 } /* Escape */
.highlight .g { color: #d4d7d6; background-color: #151718 } /* Generic */
.highlight .k { color: #9fca56; background-color: #151718 } /* Keyword */
.highlight .l { color: #d4d7d6; background-color: #151718 } /* Literal */
.highlight .n { color: #d4d7d6; background-color: #151718 } /* Name */
.highlight .o { color: #d4d7d6; background-color: #151718 } /* Operator */