Skip to content

Instantly share code, notes, and snippets.

View ninest's full-sized avatar
🎯
Experimenting

Parth Kabra ninest

🎯
Experimenting
View GitHub Profile
<?php
echo file_get_contents('http://tinyurl.com/api-create.php?url='.'http://www.example.com/');
/* For example
http://tinyurl.com/api-create.php?url=http://www.fullondesign.co.uk/
Would return:
http://tinyurl.com/d4px9f
*/
?>
@TranceCat
TranceCat / NSmessage_alert.py
Created January 19, 2015 12:39
Example of pyobjc implementation for Notification Center on OS X with reply option
#!/usr/bin/env python
from Foundation import NSUserNotification, NSUserNotificationCenter, NSObject
from PyObjCTools import AppHelper
'''
This class is used for NSUserNotificationCenter alert. User needs to select Alerts style
in System Preferences -> Notifications for the python script.
'''
class Notification(NSObject):
@jamestalmage
jamestalmage / forward.md
Last active April 9, 2024 17:21
Using Firebase to Authenticate to Google Drive

Note: There is a lot of information here, but if I have provided a link, it is probably something you should click on and read. OAuth is a complex enough subject on it's own, and hacking these two services together only adds to it.

Even so, I have found Firebase's API to be simpler than almost any other OAuth solution I have explored. When all is said and done, the important bits of code related to authentication is actually less than 10 lines. If you have ever tried to implement your own OAuth flow before, you know how amazing that is.

In the end, it may be worth using Firebase for authentication, even if that's the ONLY thing you use it for.

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@mlrawlings
mlrawlings / README.md
Last active June 14, 2022 11:15
Using `src/node_modules/` for module development

Using src/node_modules/ for module development

The issue 👎

Often you'll find that you need utility methods or other functionality that might make sense as an external module that you could :tada: open source 🎉, but the process can be painful:

  1. create a directory outside the project
  2. initialize a git repo
@aparrish
aparrish / understanding-word-vectors.ipynb
Last active November 9, 2024 12:16
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active November 19, 2024 19:30
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@lcherone
lcherone / reelgood.md
Created January 8, 2018 18:09
Curl requests to access reelgood.com API

Curl requests to access reelgood.com API

<?php
$options = [
    'nocache' => 'true',
    'kind' => 0,
    'minimumScore' => 0,
    'sources' => [
        'amazon_prime',

'fx_tveverywhere',

@bradtraversy
bradtraversy / pipenv_cheat_sheet.md
Last active November 13, 2024 18:53
Pipenv cheat sheet for common commands

Pipenv Cheat Sheet

Install pipenv

pip3 install pipenv

Activate

pipenv shell
@manzoorwanijk
manzoorwanijk / yup-with-final-form.js
Last active August 22, 2024 11:44
How to properly use yup validation schema with (React) Final Form?
import * as yup from 'yup';
import { setIn } from 'final-form';
const validationSchema = yup.object({
email: yup.string().email(),
shipping: yup.object({
name: yup.string(),
phone: yup.object({
code: yup.string().matches(/^\+\d+$/i),
number: yup.number().max(10),