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
@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);
}
}
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)
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
@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
@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
@ryboe
ryboe / .travis.yml
Last active November 23, 2023 05:37
Example .travis.yml for Golang
# use the latest ubuntu environment (18.04) available on travis
dist: bionic
language: go
# You don't need to test on very old versions of the Go compiler. It's the user's
# responsibility to keep their compiler up to date.
go:
- 1.16.x
@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');
}
@pixeline
pixeline / php_upgrade_to_71.sh
Last active March 16, 2023 16:49
Update Mac Os X's php version to php 7.1 using homebrew. Includes curl and mcrypt
# 1. Install brew --> http://brew.sh/
# 2. run the following commands in your Terminal
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew install --with-openssl curl
brew install --with-homebrew-curl --with-apache php71
brew install php71-mcrypt php71-imagick
# 3. Follow these instructions to make Apache and php-cli use the newer php executable and make the change persist after reboot.
brew info php71
@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')
@debashisbarman
debashisbarman / README.md
Last active February 15, 2024 02:19
A boilerplate Twitter bot that can retweet in response to the tweets matching particluar keyword (https://goo.gl/4whEIt)

Creating a Twitter bot with Node.js

Learn how you can create your own Twitter bot using Node.js and the new Twitter API. The bot will auto retweet in response to tweets with some particular hashtags. (https://goo.gl/4whEIt)

Tools we need

Here are the tools we’ll be using to create the bot — 

  • Node.js installed in your machine
  • A registered Twitter account

Create a Twitter application