Skip to content

Instantly share code, notes, and snippets.

View buixuanhai's full-sized avatar
🎯
Focusing

Bùi Xuân Hải buixuanhai

🎯
Focusing
  • Ho Chi Minh
View GitHub Profile
[
{ "keys": ["j", "j"], "command": "exit_insert_mode",
"context":
[
{ "key": "setting.command_mode", "operand": false },
{ "key": "setting.is_widget", "operand": false }
]
}
]
@buixuanhai
buixuanhai / 0_reuse_code.js
Created March 10, 2016 03:25
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@buixuanhai
buixuanhai / gist:ff4b29a211df3bcf47fce77372b89cca
Last active May 30, 2017 12:41
Javascript keydown Độ

Cái này là ul của AutoComplete sinh ra, mặc đinh có display là none

<ul id="ui-id-1" tabindex="0" class="ui-menu ui-widget ui-widget-content ui-autocomplete ui-front" style="display: none; top: 32px; left: 50.6875px; width: 197px;"><li class="ui-menu-item"><div id="ui-id-3" tabindex="-1" class="ui-menu-item-wrapper">ActionScript</div></li></ul>
 $(tr).find('input.form-control').keydown(function (e) {
 
                // Select cái ul của autocomplete, nếu có kết quả khác null thì mới thực hiện mấy cái dưới
#include <stdio.h>


void fifo(int chuoi_tham_chieu[], int size, int so_khung_trang)
{
    int z;
    for(z = 0; z < size; z++) {
        printf("%d ", chuoi_tham_chieu[z]);
@buixuanhai
buixuanhai / hello.md
Last active May 30, 2017 15:51
Hello markdown
@buixuanhai
buixuanhai / gist:e5b1cb11c944fb334a734b6555ee0805
Created March 26, 2018 07:11
Get query params on launching app
-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
NSLog(@"Opened by url %@", url.query);
NSDictionary *params = [self parseURL:url];
for(id key in params)
NSLog(@"key=%@ value=%@", key, [params objectForKey:key]);
NSString *amount = [params objectForKey:@"amount"];
self.amount = [amount intValue];
[[NSUserDefaults standardUserDefaults] setObject:amount forKey:@"amount"];