Skip to content

Instantly share code, notes, and snippets.

View clsource's full-sized avatar
💻
🥷🏼

Camilo clsource

💻
🥷🏼
View GitHub Profile
@ssx
ssx / verify_credentials.php
Created February 28, 2011 17:34
Single Account / Verify Credentials
<?php
// OAuth Examples: Twitter
// by Scott Wilcox <scott@dor.ky> http://dor.ky @dordotky
// https://dor.ky/oauth-examples/twitter
//
// This script verifies that the credentials you have are actually valid.
//
// First, require the OAuth library that we're going to use to handle all of the
// OAuth dirty work.
require "../library/EpiCurl.php";
@tombiscan
tombiscan / frontcontroller
Created June 4, 2011 16:09
Simple php front controller
<?php
namespace Framework;
/**
* Front controller - routes all request and dispatch it to modules.
* (MVC pattern)
* @package FrameWork
* @subpackage FrontController
* @author Tomislav Biscan
* @version 0.1
@1wErt3r
1wErt3r / SMBDIS.ASM
Created November 9, 2012 22:27
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
@olivierlacan
olivierlacan / gist:4062929
Last active February 10, 2024 10:57 — forked from Gregg/gist:968534
Code School Screencasting Framework

Screencasting Framework

The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.

Why you should care about screencasting?

You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.

  1. Communicating more effectively - At Envy Labs we produce screencasts for our clients all the time. Whether it's demoing a new feature or for a presentation for an invester, they're often much more effective and pleasent than a phone call or screen sharing.
@krig
krig / parseiso8601utc.c
Created February 20, 2013 09:32
Function to parse an ISO 8601 string with timezone suffix Z (UTC) to a time_t value.
#include <time.h>
/* parses only YYYY-MM-DDTHH:MM:SSZ */
time_t parseiso8601utc(const char *date) {
struct tm tt = {0};
double seconds;
if (sscanf(date, "%04d-%02d-%02dT%02d:%02d:%lfZ",
&tt.tm_year, &tt.tm_mon, &tt.tm_mday,
&tt.tm_hour, &tt.tm_min, &seconds) != 6)
return -1;
@joeyates
joeyates / git-copy-file-history.sh
Last active February 23, 2023 17:34
Copy a commits from one Git repo to another
# Copy all modifications to a file from one repo to another
for c in `git --git-dir=../path/to/repo/.git log --reverse --pretty=tformat:"%H" -- path/to/file`; do
git --git-dir=../path/to/repo/.git format-patch --keep-subject -1 --stdout $c | git am --3way --keep;
done
@baamenabar
baamenabar / obtener_costo_envio_paquete.php
Last active March 31, 2019 02:27 — forked from nikoskip/valores_chilexpress.php
Obtener costos de envío por Chilexpress, usando el formulario de cálculo que tienen ellos. A falta de un API, hay que hacerse uno. Todo mérito a @nikoskip
<?php
/**
* Una simple función para obtener los costos de envío de un paquete mediante Chilexpress.
* Como única dependencia se necesita de la liberia PHP Simple HTML DOM Parser: http://simplehtmldom.sourceforge.net/
*
* Para poder comunicarse con Chilexpress, se debe tener la lista de todas las comunas que ellos utilizan y el código
* que le asignan a cada una. En este archivo, al final, podrás encontrar el listado, el cual podrás parsear fácilmente
*/
@pklaus
pklaus / ddnsserver.py
Last active February 27, 2024 11:41 — forked from andreif/Simple DNS server (UDP and TCP) in Python using dnslib.py
Simple DNS server (UDP and TCP) in Python using dnslib.py
#!/usr/bin/env python
"""
LICENSE http://www.apache.org/licenses/LICENSE-2.0
"""
import argparse
import datetime
import sys
import time
import threading
@finalclass
finalclass / dep-resolve
Created October 20, 2014 23:29
dependency resolving algorithm
/**
* taken from:
* http://www.electricmonk.nl/log/2008/08/07/dependency-resolving-algorithm/
*/
class GraphNode {
public edges:GraphNode[] = [];
constructor(public name:string) {}
public addEdge(c:GraphNode):void {
this.edges.push(c);
@davbeck
davbeck / WKUIDelegate.m
Last active September 28, 2023 06:59
Boilerplate implementation of WKUIDelegate to support Javascript alerts.
#pragma mark - WKUIDelegate
- (void)webView:(WKWebView *)webView runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)())completionHandler
{
UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil
message:message
preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"OK", nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
completionHandler();