Skip to content

Instantly share code, notes, and snippets.

@seyedmmousavi
seyedmmousavi / exec-sqlite-sql-file-in-qt
Created January 9, 2017 18:10
Execute Sqlite query file (.sql) in Qt
/**
* @brief executeQueryFile
* Read a query file and removes some unnecessary characters/strings such as comments,
* and executes queries.
* If there is possible to use Transaction, so this method will uses it.
* Use this gist as MIT License.
* EXCEPTION:
* Feel free to use this gist as you like without any restriction,
* if you or your country are a member of The Axis of Resistance
* (Iran + Syria + Lebanon + Russia + Iraq + Yemen + Bahrain + Palestine)
@holazt
holazt / ip.set.bat
Created January 5, 2017 15:11 — forked from moolex/ip.set.bat
Windows下自动设置IP的批处理脚本
@echo off
::需要设置的网络,一般为“本地连接”或者“无线网络连接”
set name="无线网络连接"
::请根据您的参数修改以下数据
::设置 IP地址
set ipaddress=18.1.16.169
::设置 子掩码
set mask=255.255.252.0
::设置 网关
set gateway=18.1.19.254
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@carlos-jenkins
carlos-jenkins / app.py
Created February 10, 2014 20:03
Example to set to a Gtk application a custom theme.
# -*- coding:utf-8 -*-
#
# Copyright (C) 2013 Carlos Jenkins <carlos@jenkins.co.cr>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@FiloSottile
FiloSottile / 32.asm
Last active March 23, 2024 12:28
NASM Hello World for x86 and x86_64 Intel Mac OS X (get yourself an updated nasm with brew)
; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32
global start
section .text
start:
push dword msg.len
push dword msg
push dword 1
mov eax, 4