Skip to content

Instantly share code, notes, and snippets.

Avatar

minyoad minyoad

View GitHub Profile
@minyoad
minyoad / pre-commit
Last active Aug 24, 2020
git hooks pre-commit to automatic update *.js *.css version
View pre-commit
#!/bin/bash
###
## change js and css file version by append ?v111111
##
## usage: copy to .git/hooks/pre-commit
## chmod a+x .git/hooks/pre-commit
#
##
modified_files=$(git diff --cached --name-only)
View UITableViewDataSorceAndDelegate.m
#pragma mark - Table View Data Source
- (NSInteger)tableView:(UITableView *)tableView
numberOfRowsInSection:(NSInteger)section
{
return 0;
}
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
View Launcher 1.3.6 LSApplicationQueriesSchemes
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<string>fb254145378030027</string>
<string>isupr8</string>
<string>fb176151905794941</string>
<string>recipeSearch-iPad</string>
<string>airfile</string>
<string>univision</string>
@minyoad
minyoad / gist:6d50918a507e2a6bce3cb0c2943d5ab0
Created Apr 10, 2017 — forked from loretoparisi/gist:4247490
Objective-C Unicode Escaping + JSON
View gist:6d50918a507e2a6bce3cb0c2943d5ab0
/**
* LP: Escape Unicode for json string object
*/
-(NSString*)escapeUnicodeWithString:(NSString*)stringToEscape {
NSError *error;
NSString *escapedString;
escapedString = [stringToEscape JSONStringWithOptions:JKSerializeOptionEscapeUnicode includeQuotes:YES error:&error];
if(error) {
@minyoad
minyoad / 0_reuse_code.js
Created Nov 2, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console