Skip to content

Instantly share code, notes, and snippets.

View xSavitar's full-sized avatar
🏠
In the shadows... 🌩

Derick Alangi xSavitar

🏠
In the shadows... 🌩
View GitHub Profile
@mahmoud
mahmoud / labs_schema.sql
Last active December 23, 2017 17:14
labs schema for hashtag caching
CREATE TABLE /*_*/hashtags (
ht_id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
ht_text varbinary(767) NOT NULL default '',
ht_create_timestamp varbinary(14) NOT NULL default '');
CREATE INDEX /*i*/ht_text ON hashtags (ht_text);
CREATE INDEX /*i*/ht_create_timestamp ON hashtags (ht_create_timestamp);
CREATE TABLE /*_*/hashtag_recentchanges (
ht_id int NOT NULL,
@Krinkle
Krinkle / 01-parkers-number-of-feb2014.js
Created April 18, 2019 01:18
3435 – The sum of each digit raised to the power of itself.
const MAX = 100 * 1000 * 1000; // 100 million
function powself(number) {
if (number === 0) {
return NaN; // matt does not like zero.
} else {
return Math.pow(number, number);
}
}
@nardhar
nardhar / git-server-centos7.md
Last active June 14, 2021 20:49
Git Server CentOS 7

Configure Git Server on CentOS 7

Server

$ yum install git-core
$ sudo useradd git
$ sudo passwd git
$ sudo su git
$ cd
@ianchan85
ianchan85 / sublimetext
Created September 14, 2017 16:38
Sublime text 3 license
----- BEGIN LICENSE -----
TwitterInc
200 User License
EA7E-890007
1D77F72E 390CDD93 4DCBA022 FAF60790
61AA12C0 A37081C5 D0316412 4584D136
94D7F7D4 95BC8C1C 527DA828 560BB037
D1EDDD8C AE7B379F 50C9D69D B35179EF
2FE898C4 8E4277A8 555CE714 E1FB0E43
D5D52613 C3D12E98 BC49967F 7652EED2
anonymous
anonymous / commands.txt
Created December 10, 2017 16:07
Command listing for ZppixBot@chat.freenode.net
ADMIN save quit msg part me join set mode
ADMINCHANNEL unquiet topic kickban kick tmask showmask quiet
unban ban
ADMINLIST accesslevel botadmins
ANNOUNCE announce
CALC py c
@kevinelliott
kevinelliott / osx-10.11-setup.md
Last active April 10, 2022 15:47
Mac OS X 10.11 El Capitan Setup

Mac OS X 10.11 El Capitan

Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.10 Yosemite setup recipe (as found on this gist https://gist.github.com/kevinelliott/0726211d17020a6abc1f). Note that I expect this to change significantly as I install El Capitan several times.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

node *find_loop(node *head)
{
node *p1;
node *p2;
if (head == NULL)
return (NULL);
p1 = head;
p2 = head;
while (p2->next != NULL && p2->next->next != NULL)
@rheajt
rheajt / Code.gs
Created June 14, 2017 15:38
google apps script to open a new website in a new window
function openTab() {
var selection = SpreadsheetApp.getActiveSheet().getActiveCell().getValue();
var html = "<script>window.open('" + selection + "');google.script.host.close();</script>";
var userInterface = HtmlService.createHtmlOutput(html);
SpreadsheetApp.getUi().showModalDialog(userInterface, 'Open Tab');
}
@zcourts
zcourts / gh-importer.py
Last active August 10, 2022 19:31 — forked from dasevilla/github-issue-to-phab-task.py
Copy GitHub issues to Phabricator
import json
import os
import sys
import requests
import envoy
GITHUB_TOKEN = os.environ.get('GITHUB_TOKEN')
if GITHUB_TOKEN is None:
raise Exception('Missing GITHUB_TOKEN from os.environ')
@dasevilla
dasevilla / github-issue-to-phab-task.py
Created May 6, 2014 23:01
Copy GitHub issues to Phabricator
import json
import os
import requests
GITHUB_TOKEN = os.environ.get('GITHUB_TOKEN')
if GITHUB_TOKEN is None:
raise Exception('Missing GITHUB_TOKEN from os.environ')