Skip to content

Instantly share code, notes, and snippets.

@timabell
timabell / vs-bash-console.bat
Created May 7, 2012 11:59
batch script for loading git-bash and the vs tools in the same window
@echo off
REM batch script for loading git-bash and the vs tools in the same window
REM inspiration: http://www.drrandom.org/post/2011/11/16/Grappling-with-multiple-remotes-in-git-tfs.aspx
RME screenshot: https://twitter.com/#!/tim_abell/status/199474387731226624/photo/1
%HOMEDRIVE%
cd %HOMEPATH%
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
echo Use full exe names when running under bash, e.g. "msbuild.exe"
echo Loading bash, you may now use git and msbuild in the same console \o/.
"C:\Program Files (x86)\Git\bin\sh.exe" --login -i
@achempion
achempion / content_tag.js
Created October 14, 2012 14:15
Простой метод, позволяет создавать теги как с помощью рельсового метода `content_tag`
var content_tag;
content_tag = function(tag, content, params){
var tag, content, params, res;
var insert_params = '';
for(var key in params){
insert_params += ' '+key+'='+'"'+params[key]+'"';
}
if(content){
res = '<'+tag+insert_params+'>'+content+'</'+tag+'>';
} else {
@defunctzombie
defunctzombie / browser.md
Last active July 15, 2024 04:13
browser field spec for package.json
req_pq#60469778 nonce:int128 = ResPQ
resPQ#05162463 nonce:int128 server_nonce:int128 pq:string server_public_key_fingerprints:Vector long = ResPQ
req_DH_params#d712e4be nonce:int128 server_nonce:int128 p:string q:string public_key_fingerprint:long encrypted_data:string = Server_DH_Params
p_q_inner_data#83c95aec pq:string p:string q:string nonce:int128 server_nonce:int128 new_nonce:int256 = P_Q_inner_data
server_DH_params_fail#79cb045d nonce:int128 server_nonce:int128 new_nonce_hash:int128 = Server_DH_Params;
server_DH_params_ok#d0e8075c nonce:int128 server_nonce:int128 encrypted_answer:string = Server_DH_Params;
server_DH_inner_data#b5890dba nonce:int128 server_nonce:int128 g:int dh_prime:string g_a:string server_time:int = Server_DH_inner_data;
set_client_DH_params#f5045f1f nonce:int128 server_nonce:int128 encrypted_data:string = Set_client_DH_params_answer;
client_DH_inner_data#6643b654 nonce:int128 server_nonce:int128 retry_id:long g_b:string = Client_DH_Inner_Data
dh_gen_ok#3bcbf734 nonce:int128 server_no
@alirobe
alirobe / reclaimWindows10.ps1
Last active July 3, 2024 09:36
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
/* ========================================================================
$File: tools/ctime/ctime.c $
$Date: 2016/05/08 04:16:55PM $
$Revision: 7 $
$Creator: Casey Muratori $
$Notice:
The author of this software MAKES NO WARRANTY as to the RELIABILITY,
SUITABILITY, or USABILITY of this software. USE IT AT YOUR OWN RISK.
@nickrolfe
nickrolfe / windows_modern_opengl_context.c
Last active July 13, 2024 20:08
Sample code showing how to create a window using a modern OpenGL core profile context without any libraries other than the standard Win32 wglXXX calls.
// Sample code showing how to create a modern OpenGL window and rendering context on Win32.
#include <windows.h>
#include <gl/gl.h>
#include <stdbool.h>
typedef HGLRC WINAPI wglCreateContextAttribsARB_type(HDC hdc, HGLRC hShareContext,
const int *attribList);
wglCreateContextAttribsARB_type *wglCreateContextAttribsARB;
@maanavshah
maanavshah / pre-commit
Created October 4, 2018 13:56
Pre-commit hook to avoid debugger commands - Ruby
# This script verifies if a list of "blacklist" words are presented in the files you are intended to commit such console
# output, debugging information or keys/tokens/passwords
# Instructions:
# Put this file into your .git/hooks folder and set as executable (chmod +x pre-commit)
# If you want to skip the hook just add the --no-verify: git commit --no-verify
# ---------------------------------------------
13678 sex_eq
3787 country_eq
3654 country_null
3397 status_eq
3376 status_neq
3070 interests_contains
3039 interests_any
2190 likes_contains
1585 city_eq
1510 city_any