Skip to content

Instantly share code, notes, and snippets.

Qais Patankar qaisjp

Block or report user

Report or block qaisjp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View AddReportLog.cpp
AddReportLog(1003, SString("CInstallManager::_ChangeToAdmin - exit(0) %s", ""));
AddReportLog(1041, SString("* Launch * pid:%d '%s' MTASAPath set from %s '%s'", dwProcessId, GetLaunchPathFilename().c_str(), GotPathFrom.c_str(),
AddReportLog(1044, SString("* End (0x%X)* pid:%d", iReturnCode, GetCurrentProcessId()));
AddReportLog(1060, SString("CInstallManager::Continue - return %s", *strCommandLineOut));
AddReportLog(1061, SString("CInstallManager::RestoreSequencerState %s", *strText));
AddReportLog(1062, SString("GetLauncherPathFilename %s", *strResult));
AddReportLog(1070, SString("CallFunction: %s", *strName));
AddReportLog(2005, SString("DoPollDownload: Downloaded %d bytes from %s", m_JobInfo.downloadBuffer.size(), m_strLastQueryURL.c_str()));
AddReportLog(2007, SString("DoPollDownload: Downloaded %s", m_JobInfo.strSaveLocation.c_str()));
AddReportLog(2050, SString("_InstallFiles: ok %s", ""));
View todo.md

Stuff to add to "Changes to 1.5.7" wiki page

This only goes up to 680f14d48c861f012b4864d27d11740123d5d39e

Fixes

@qaisjp
qaisjp / README.md
Created Aug 6, 2019
Lock Screen Complex Modification
View README.md

Karabiner Elements - Lock Screen Complex Modification

This allows you to do Cmd+Shift+X at any time to trigger a screen lock.

You can actually do this natively by setting up an Automator script, but that won't work in programs that manually bind to that key combination (e.g. Slack, for strikethrough).

(Doing it with Karabiner Elements will override any existing keybind.)

How to install

@qaisjp
qaisjp / qaisjp-robbynew.zsh-theme
Last active Jul 31, 2019
The zsh theme that I use, based on robbyrussell. I was very creative when I hopped over to zsh, and named it "robbynew".
View qaisjp-robbynew.zsh-theme
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
# You may choose to remove %n@ vv here!
PROMPT='%{$fg_bold[green]%}%n@%m:%{$fg[cyan]%} %~%{$reset_color%} $(git_prompt_info)
%{${ret_status}%}%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
@qaisjp
qaisjp / deploy-cv.gs
Created Jun 26, 2019
Set "onOpen" as the default function. Provide a script property "pdf" with value = the file ID of your pdf document
View deploy-cv.gs
function onOpen() {
var ss = DocumentApp.getUi();
ss.createMenu("qais.jp/cv")
.addItem("Deploy this", "actionDeploy")
.addToUi();
};
function getPDFFile() {
const id = PropertiesService.getScriptProperties().getProperty("pdf");
View mtasa-macos.md

MTA:SA on macOS instructions

Preparation

  1. Download mtasa-1.5.6.exe
  2. Make sure you have the GTA San Andreas folder copied to your computer.
    • You might need a GTA SA 1.00 No CD crack - any HOODLUM release will do.

Install Wine

  1. Make sure you have Homebrew installed.
View infos.slots.md

To answer your question, neither remove_block or insert_block alters the pgd given to it.

So after a bit of reading of the code I think I finally understand why it uses pointers^squared. I hope I haven't overexplained anything but this might help someone. Someone else pls correct me if i'm wrong.

Blocks:

  • Some .. block .. of memory.
  • It's important to remember that a PageDescriptor is not a block itself, and neither is a PageDescriptor*. Read on.

Page Descriptors:

View gist:7ee02d8d06dc41d0bbed7537a7365d18
Page 1: SDP Student Information
1. Please provide your university email address. Required
Please enter a valid email address.
2. Have you done/currently doing the course IVR? Required
Yes
No
3. Briefly describe any internships you have done. (If none write "N.A.") Required
@qaisjp
qaisjp / unifdef.py
Created Sep 14, 2018
Python script to remove include guards from files. It also leaves files with exactly one trailing newline.
View unifdef.py
#! /usr/bin/env python3
import sys, os
def main(args):
if len(args) < 2:
print("./unifdef file1.h file2.h..")
print("Python script to remove include guards from files, and replaces with '#pragma once'.")
@qaisjp
qaisjp / schema.sql
Created Jul 29, 2018
quickfox schema
View schema.sql
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.5
-- Dumped by pg_dump version 10.4
-- Started on 2018-07-29 18:00:35 BST
SET statement_timeout = 0;
You can’t perform that action at this time.