Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
😎

Kamel Labiad kamel3d

💭
😎
View GitHub Profile
View reuters-rss.txt
http://feeds.reuters.com/news/artsculture
http://feeds.reuters.com/reuters/businessNews
http://feeds.reuters.com/reuters/companyNews
http://feeds.reuters.com/reuters/entertainment
http://feeds.reuters.com/reuters/environment
http://feeds.reuters.com/reuters/healthNews
http://feeds.reuters.com/reuters/lifestyle
http://feeds.reuters.com/news/reutersmedia
http://feeds.reuters.com/news/wealth
http://feeds.reuters.com/reuters/MostRead
@karlkranich
karlkranich / apitest.php
Last active Jul 17, 2018
Updated PHP code to use the Google Sheets API. See usage instructions at http://karl.kranich.org/2015/04/16/google-sheets-api-php/ More examples at https://gist.github.com/karlkranich/afa39e3d778455b38c38
View apitest.php
<?php
// apitest.php
// by Karl Kranich - karl.kranich.org
// version 3.1 - edited query section
require_once realpath(dirname(__FILE__) . '/vendor/autoload.php');
include_once "google-api-php-client/examples/templates/base.php";
$client = new Google_Client();
@pudquick
pudquick / example.applescript
Last active Jan 2, 2019
Example AppleScriptObjC / Cocoa-Applescript function for parsing hdiutil mount plist output via ObjC calls
View example.applescript
script AppDelegate
property parent: class "NSObject"
-- Syntax sugar
property myApp: current application
property None: missing value -- Be careful not to bind this as a IBOutlet!
-- Classes
property NSData: myApp's class "NSData"
property NSString: myApp's class "NSString"
@mandiwise
mandiwise / Count lines in Git repo
Last active Nov 29, 2020
A command to calculate lines of code in all tracked files in a Git repo
View Count lines in Git repo
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository
$ git ls-files | xargs wc -l
@sgr
sgr / workaround_the_iconservices_bug_mavericks.sh
Last active Jul 25, 2020
When "com.apple.IconServicesAgent" exhausts CPU resources on Mac OSX mavericks (10.9), you can try following workaround.
View workaround_the_iconservices_bug_mavericks.sh
#!/bin/sh
mkdir ${TMPDIR}/com.apple.IconServices
@walesmd
walesmd / IconServiceAgent.md
Last active Nov 4, 2020
A lot of people are having issues with com.apple.IconServicesAgent. Since this is a very new issue, Google was no help and `man iconservicesd` is even more hilarious. I eventually fixed it, when I was working on a completely different issue (that is still not fixed). The instructions are below and on the Apple Support Forum, https://discussions.…
View IconServiceAgent.md

I was chasing down another issue (slow "Save As") and thought these two issues may have been related (with QuickLook being the common broken link). Unfortunately, my "Save As" dialog is still miserably slow on the initial load; but IconServicesAgent hasn't gone above 30MB and he rarely makes an appearance in the Console!

Some of these steps may not be necessary, but here are all of the steps I took that inadverdently put IconServicesAgent back in its place. Note: all commands are a single-line, if they appear to be multiple that's just the forum formatting.

  1. Check for any QuickLooks related .plist files. In a terminal: mdfind com.apple.quicklook. -name .plist

  2. I only had files at the system level (specifically within /System/Library/LaunchAgents/). If you have others, modify the directions below to take that into account (re-introducing plist files from the system level back up to the user).

  3. Make some temporary directories to store these plist files, just in case: mkdir ~/tmp-quicklook

@Xeoncross
Xeoncross / google_doc_cms.php
Created Apr 1, 2013
Fetch a google doc, parse it, cache it, and display the content inside a webpage using PHP.
View google_doc_cms.php
<?php
// Based on http://www.realisingdesigns.com/2009/10/29/using-google-docs-as-a-quick-and-easy-cms/
function getUrl($url, $expires = 5)
{
$cache_file = __DIR__ . '/cache/' . preg_replace('~\W+~', '-', $url) . '.txt';
if( ! is_dir(__DIR__ . '/cache') AND ! mkdir(__DIR__ . '/cache')) {
die('Please create /cache directory');
}
@nikcub
nikcub / README.md
Created Oct 4, 2012
Facebook PHP Source Code from August 2007
View README.md
@stevederico
stevederico / LayerCakeScript
Created Apr 17, 2012
LayerCake Rename Layers Photoshop Script
View LayerCakeScript
//LayerCake Rename PhotoShop Script by Steve Derico http://www.stevederico.com
Credits:
// Rename Layers - Adobe Photoshop Script
// Requirements: Adobe Photoshop CS, or higher
// Description: renames and numbers all layers in the active document (using the supplied name pattern)
// Author: Trevor Morris (trevor@morris-photographics.com)
// Website: http://morris-photographics.com/
// ============================================================================
// Installation:
You can’t perform that action at this time.