Skip to content

Instantly share code, notes, and snippets.

View dan-king's full-sized avatar

Dan King dan-king

View GitHub Profile
@dan-king
dan-king / Create iOS Icons 2016 Sizes with 180.jsx
Created April 4, 2020 05:25 — forked from colus001/Create iOS Icons 2016 Sizes with 180.jsx
Photoshop Script to Create iOS Icons from a source image
// Photoshop Script to Create iPhone Icons from iTunesArtwork
//
// WARNING!!! In the rare case that there are name collisions, this script will
// overwrite (delete perminently) files in the same folder in which the selected
// iTunesArtwork file is located. Therefore, to be safe, before running the
// script, it's best to make sure the selected iTuensArtwork file is the only
// file in its containing folder.
//
// Copyright (c) 2010 Matt Di Pasquale
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com
@shrunyan
shrunyan / index.js
Created March 21, 2018 17:20
Take screenshots of urls. Inspired by https://meowni.ca/posts/2017-puppeteer-tests/
const puppeteer = require('puppeteer')
const express = require('express')
const querystring = require('querystring')
const server = express()
/**
* Screenshot a url
* e.g. /screenshot?url=https://www.npmjs.com&width=800&height=600
*/
server.get('/screenshot', async (req, res) => {
@niksudan
niksudan / mc-server-setup.md
Last active May 4, 2024 15:49
How to create a new Minecraft Server with DigitalOcean

Creating a new Minecraft Server

This is a short and simple guide on how to set up a multiplayer server running the latest version of Minecraft.

This guide has been tested on Ubuntu 16.04 and 18.04.

Setup

Create a new Ubuntu droplet on DigitalOcean. Make sure it has at least 2GB of RAM, and you provide it with your SSH key.

@colus001
colus001 / Create iOS Icons 2016 Sizes with 180.jsx
Last active April 4, 2020 05:25 — forked from alexsdesign/Create iOS Icons 2016 Sizes.jsx
Photoshop Script to Create iOS Icons from a source image
// Photoshop Script to Create iPhone Icons from iTunesArtwork
//
// WARNING!!! In the rare case that there are name collisions, this script will
// overwrite (delete perminently) files in the same folder in which the selected
// iTunesArtwork file is located. Therefore, to be safe, before running the
// script, it's best to make sure the selected iTuensArtwork file is the only
// file in its containing folder.
//
// Copyright (c) 2010 Matt Di Pasquale
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active June 1, 2024 09:44
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@maxparm
maxparm / instagram.php
Created April 3, 2012 17:42
PHP - Request Instagram api with PHP/Curl
<?php
//Get data from instagram api
$hashtag = 'max';
//Query need client_id or access_token
$query = array(
'client_id' => '',
'count' => 3
);
$url = 'https://api.instagram.com/v1/tags/'.$hashtag.'/media/recent?'.http_build_query($query);