Skip to content

Instantly share code, notes, and snippets.

View theLine's full-sized avatar

theLine

View GitHub Profile
@spoonerWeb
spoonerWeb / HelpfulToolsToConcentrate.md
Last active October 2, 2019 09:16
Helpful tools to concentrate on important things

Helpful tools to concentrate on important things

devdocs.io

It's a bundle of documentation of languages, projects and other stuff. Easily searchable and can be used offline.

Download: https://devdocs.io

postman

(function() {
'use strict';
function getType(src) {
return src.match(/\.([^\.\?]+)(?:\?.*)?$/)[1];
}
function injectContent(content, type) {
if (type === 'css') {
var style = document.createElement('style');
@eyecatchup
eyecatchup / get-win7-productkey.vbs
Created August 16, 2014 15:52
VBS Script to get the Windows(R) 7 Product Key from a PC's registry.
' VBS Script to get the Windows(R) 7 Product Key from a PC's registry.
'
' Save the VBScript as "getWin7Key.vbs" somewhere on your Windows7 PC.
' Now, when you double-click the local script file an alertbox pops up
' displaying the product key stored in the machine's Windows registry.
Set WshShell = WScript.CreateObject("WScript.Shell")
KeyPath = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"
MsgBox ExtractKey(WshShell.RegRead(KeyPath))
@ewjoachim
ewjoachim / format.js
Last active December 29, 2015 17:18
Python's.format for Javascript
String.prototype.format = function (obj) {
/**
* Does the same as a simple form of python "".format
* that will not work for anything else than number or string.
* Array form :
* "I have {} replacements to {}".format("two", "make")
* "I have {} replacements to {}".format(["two", "make"])
* "I have {0} replacements to {1}".format(["two", "make"])
* Dict form :
* "Hello {name} !".format({name: "Bob"});
@pixelpogo
pixelpogo / gist:5229558
Created March 23, 2013 22:20
Install Z Shell (oh-my-zsh) in your Uberspace account
# download and install Oh-my-ZSH
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
# make zsh your default shell
chsh -s /bin/zsh
@oodavid
oodavid / README.md
Last active April 6, 2024 18:45 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
/*
From: http://devoracles.com/the-best-method-to-check-for-internet-explorer-in-javascript
"I declared a new variable, called IE, which has the value a comment block followed by ‘false‘.
The above variable will be understood by IE: var IE = !false, because Internet Explorer uses
JScript — a Javascript-like dialect of the standard ECMAScript — instead of Javascript which is
used by all the other browsers. JScript can parse the comments, just like Internet Explorer (see
conditional HTML comments post). This is a unique feature of IE, none of the other browsers can do it,
so Firefox, Chrome, Safari, Opera, all will understand the above declaration as IE = false."
*/