Skip to content

Instantly share code, notes, and snippets.

View level09's full-sized avatar
🌴
Always on vacation

Nidal Alhariri level09

🌴
Always on vacation
View GitHub Profile
http://www.alarabiya.local/ar/sitemap.xml.gz
http://www.alarabiya.local/ar/arab-and-world/sitemap.xml.gz
http://www.alarabiya.local/ar/arab-and-world/egypt/sitemap.xml.gz
http://www.alarabiya.local/ar/arab-and-world/egypt/event-files/sitemap.xml.gz
http://www.alarabiya.local/ar/arab-and-world/egypt/journalism/sitemap.xml.gz
http://www.alarabiya.local/ar/arab-and-world/egypt/coverage/sitemap.xml.gz
http://www.alarabiya.local/ar/arab-and-world/egypt/change/sitemap.xml.gz
http://www.alarabiya.local/ar/arab-and-world/egypt/candidate-cv/sitemap.xml.gz
http://www.alarabiya.local/ar/arab-and-world/egypt/candidates-programs/sitemap.xml.gz
http://www.alarabiya.local/ar/arab-and-world/egypt/constitution/sitemap.xml.gz
def youtube_upload(package):
if package.youtube == '1' or package.youtube == '2':
dev_email= G_USER
dev_password= G_PASS
dev_application= PROD_NAME
dev_key= API_KEY
youtube_user= YT_USER
$view = new view();
$view->name = 'popular_tags';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'taxonomy_term_data';
$view->human_name = 'Popular Tags';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
@level09
level09 / gist:5764423
Last active December 18, 2015 09:49
Drupal Create node Programmatically
<?php
/*
* $custom_fields is array of format:
*
* array(
* array(
* 'field'=>'location',
* 'value'=> 'dubai',
* ),
@level09
level09 / gist:6579270
Created September 16, 2013 11:04
nginx in front of apache
server {
listen 80;
index index.html;
server_name alarabiya.net www.alarabiya.net;
location / {
import java.io.File;
public class ListFiles
{
public static void main(String[] args)
{
// Directory path here
String path = ".";
@level09
level09 / nu8
Created November 26, 2013 19:49
NU8 signature
<p style="font:arial 12px;color:#555;line-height:22px;">Martina Rohel<br>
CEO</p>
<p style="font:arial 12px;color:#555;line-height:22px;">
<img src="data:image/jpg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAABVAAD/4QNxaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjMtYzAxMSA2Ni4xNDU2NjEsIDIwMTIvMDIvMDYtMTQ6NTY6MjcgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6NzZEQzYzNkIyNzIwNjgxMThBNkREQTlBQ0IzRTQzNEQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MjU4OTc4RkU0RUY0MTFFMzhFMURBRjM5NjgwRUE3NkUiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5
@level09
level09 / shorturl.py
Created October 21, 2014 09:52
Short ID Generator
'''
Short URL Generator
===================
Python implementation for generating Tiny URL- and bit.ly-like URLs.
A bit-shuffling approach is used to avoid generating consecutive, predictable
URLs. However, the algorithm is deterministic and will guarantee that no
collisions will occur.
{
"loc": "",
"youliked": false,
"title": "",
"deleted": false,
"text": "Nature",
"created_at": "2015-08-02 20:28:42",
"views": 0,
"media_thumb": "https://hostname/static/files/videos/2015/08/02/wToYREIrwhtnDdZtpgVQVRJjhIKvje.jpg",
"order": 101,
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.2 24320 1048 ? Ss May04 10:53 /sbin/init
root 2 0.0 0.0 0 0 ? S May04 0:00 [kthreadd]
root 3 0.0 0.0 0 0 ? S May04 111:37 [ksoftirqd/0]
root 5 0.0 0.0 0 0 ? S< May04 0:00 [kworker/0:0H]
root 6 0.0 0.0 0 0 ? S May04 0:00 [kworker/u:0]
root 7 0.0 0.0 0 0 ? S< May04 0:00 [kworker/u:0H]
root 8 0.0 0.0 0 0 ? S May04 0:00 [migration/0]
root 9 0.0 0.0 0 0 ? S May04 0:00 [rcu_bh]
root 10 0.0 0.0 0 0 ? S May04 107:26 [rcu_sched]