Skip to content

Instantly share code, notes, and snippets.

g30H g30h

  • London, UK
Block or report user

Report or block g30h

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
@tablekat
tablekat / main.ts
Created Jun 30, 2016
Making gmail push notifications to webhook
View main.ts
import * as request from 'request';
import * as fs from 'fs';
import * as readline from 'readline';
var google = require('googleapis');
var googleAuth = require('google-auth-library');
/*************** STEPS
- made a project on https://console.cloud.google.com/cloudpubsub/topicList?project=testmabs thing?
@mrliptontea
mrliptontea / sublime-text-3-windows-shortcuts.md
Last active Dec 9, 2019 — forked from TheShrike/gist:6111200
Sublime Text 3 - Useful Shortcuts (Windows)
View sublime-text-3-windows-shortcuts.md

Sublime Text 3 - Useful Shortcuts (Windows)

General

Shortcut Description
Ctrl+Shift+P command prompt
Ctrl+Alt+P switch project
Ctrl+P go to file
Ctrl+G go to line
@jNizM
jNizM / gist:79aa6a4b8ec428bf780f
Last active May 16, 2019
[AHK] AES Encryption (String)
View gist:79aa6a4b8ec428bf780f
/*
Update v0.4
Todo: - CryptSetKeyParam (KP_MODE with CBC [maybe CFB, ECB, OFB or CTS])
*/
MsgBox % enc := AES.Encrypt("Test String", "testpw", 256)
MsgBox % AES.Decrypt(enc, "testpw", 256)
Class AES
{
@ttscoff
ttscoff / bytes.rb
Created Nov 2, 2014
Convert file sizes between human-readable and machine representations
View bytes.rb
#!/usr/bin/ruby
module Bytes
def to_human(n,fmt=false)
count = 0
formats = %w(B KB MB GB TB PB EB ZB YB)
while (fmt || n >= 1024) && count < 8
n /= 1024.0
@jcppkkk
jcppkkk / OpenWithSublime.bat
Last active Aug 23, 2019 — forked from FoxColdMetal/OpenWithSublimeText.bat
[[[ Move to https://github.com/jcppkkk/OpenWithSublime !!! ]]] Add context menu to allow user open file or folder with Sublime as User (or as Admin).
View OpenWithSublime.bat
@echo off
:: Path to Sublime Text installation dir.
SET stPath=%~dp0sublime_text.exe
SET stPathOnly=%~dp0
:: Key name for the registry entries.
SET UserEntry=Sublime Text
SET AdminEntry=Sublime Text As Admin
:: Context menu texts.
SET "UserMenuText=Open with Sublime(&-)"
SET "AdminMenuText=Open with Sublime As Admin(&+)"
@Adirael
Adirael / fix-wordpress-permissions.sh
Created Aug 17, 2012
Fix wordpress file permissions
View fix-wordpress-permissions.sh
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
@velocityzen
velocityzen / auth.py
Created Sep 26, 2011
This script take pictures from directory and post it to tumblr blog and then delete it. Tumblr API v2! This example for oath file upload.
View auth.py
import urlparse
import oauth2 as oauth
consumer_key = ''
consumer_secret = ''
request_token_url = 'http://www.tumblr.com/oauth/request_token'
access_token_url = 'http://www.tumblr.com/oauth/access_token'
authorize_url = 'http://www.tumblr.com/oauth/authorize'
You can’t perform that action at this time.