Skip to content

Instantly share code, notes, and snippets.

View kennethpdev's full-sized avatar
:octocat:
I may be slow to respond.

Kenneth kennethpdev

:octocat:
I may be slow to respond.
View GitHub Profile
@victornpb
victornpb / deleteDiscordMessages.js
Last active June 27, 2024 21:31
Delete all your messages from DM or Channel in Discord
/*
This file is now hosted here:
https://github.com/victornpb/undiscord
*/
@jjulian
jjulian / * Android Version & API Level List.md
Last active May 1, 2019 19:15 — forked from yicr/Android Version API Level List.md
* Android Version & API Level List on 2016/08/28

Androidのバージョン表記及びAPI Level

Version Code Name Level Build.VERSION_CODES.
1.0 1 BASE
1.1 2 BASE_1_1
1.5 Cupcake 3 CUPCAKE
1.6 Donut 4 DONUT
2.0 Eclair 5 ECLAIR
2.0.1 6 ECLAIR_0_1
@brenopolanski
brenopolanski / npm-list-globally.md
Created November 1, 2016 19:34
Listing globally installed NPM packages and version
npm list -g --depth=0
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
@so0k
so0k / gist:cdd24d0a4ad92014a1bc
Last active March 4, 2024 14:17
droplet discovery over digitalocean private networks

Digital Ocean recently released private networking support in their NYC2 Data center.

They also published a blog post on how to setup a new droplet with private networking. But one thing the post doesn't do is tell you how to scale your private network for many boxes. One approach is obviously to edit /etc/hosts (but this gets annoying when you add a new box). A better way is to create an internal DNS zone (via the digital ocean web interface) and have your droplets use it:

Steps

setup the internal DNS zone file

  1. Login to digital ocean
  2. Click "DNS" on the right hand menu
@aneelkkhatri
aneelkkhatri / facebook-video-download-script.js
Last active January 19, 2022 22:44
Script for downloading Facebook videos
var LINK_TYPE_SD = 'sd_src_no_ratelimit';
var LINK_TYPE_HD = 'hd_src_no_ratelimit';
(function downloadVideo(type) {
function getMyObject(doc) {
var scriptsCollection = doc.getElementsByTagName("script");
var scripts = [];
var regExp = /video_ids/i;
for (var i = scriptsCollection.length - 1; i >= 0; i--) {
var script = scriptsCollection[i].innerHTML;
<?php
// set recipient information
$recipientName = "[RECIPIENT_NAME]";
$recipientEmail = "[RECIPIENT_EMAIL]";
// configure the document we want signed
$documentFileName = "[PATH/TO/DOCUMENT.PDF]";
$documentName = "TestFile.pdf";
@Arahnoid
Arahnoid / RGB-Hex.js
Last active December 27, 2022 21:32
[Convert color format] Bunch of RGB to Hex and Hex to RGB convert javascript functions what works well in Photoshop #Photoshop
///////////////////////////////////////////////////////////////////////////////////
/// Colection of RGB to HSB, HSB to RGB convert functions
/// Source: http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb
///////////////////////////////////////////////////////////////////////////////////
/**
* componentToHex convert two digit htx value to R, G or B chanel value
* @param number c value from 0 to 225
* @return string value of R, G or B chanel
* @usage //alert (componentToHex(255)); //ff
@jgv
jgv / random number generation, no repeats
Created August 19, 2010 16:43
generate random numbers in php with no repeats
function randomDigits($length){
$numbers = range(0,9);
shuffle($numbers);
for($i = 0;$i < $length;$i++)
$digits .= $numbers[$i];
return $digits;
}