Advertisement
Guest User

anthony gorecki anthony@anthonygorecki.ca

a guest
Nov 14th, 2015
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.35 KB | None | 0 0
  1. Sat Nov 14 05:53:35 EST 2015
  2. dev/libgc-proj/proj-make.txt
  3. #===============================================================================
  4. # This file is part of Libgc-proj.
  5. # Copyright (C) 2015 Anthony Gorecki <anthony@anthonygorecki.ca>
  6. #
  7. # Libgc-proj is free software: you can redistribute it and/or modify it under
  8. # the terms of the GNU General Public License as published by the Free Software
  9. # Foundation, either version 3 of the License, or (at your option) any later
  10. # version.
  11. #
  12. # Libgc-proj is distributed in the hope that it will be useful, but WITHOUT ANY
  13. # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  14. # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License along with
  17. # Libgc-proj. If not, see <http://www.gnu.org/licenses/>.
  18. #===============================================================================
  19. # gc-proj-conf (tracks config; can reconfigure)
  20. # gc-proj-make (will rebuild changed files; will rebuild only necessary after conf change)
  21. # gc-proj-inst (installs all built targets)
  22.  
  23. DTGT gc-proj
  24.  
  25. TGEN dev
  26. MAKE
  27. EXEC lib/pkgconfig/make.sh $PREF
  28. INST
  29. COPY include/gc $PREF/include
  30. MOVE lib/pkgconfig/gc-proj.pc.tmp $PREF/lib/pkgconfig/gc-proj.pc
  31.  
  32. TLIB gc-proj
  33. dev/libgc-base/src/ct/u8b.c
  34. //==============================================================================
  35. // This file is part of Libgc-base.
  36. // Copyright (C) 2015 Anthony Gorecki <anthony@anthonygorecki.ca>
  37. //
  38. // Libgc-base is free software: you can redistribute it and/or modify it under
  39. // the terms of the GNU General Public License as published by the Free Software
  40. // Foundation, either version 3 of the License, or (at your option) any later
  41. // version.
  42. //
  43. // Libgc-base is distributed in the hope that it will be useful, but WITHOUT ANY
  44. // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  45. // A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  46. //
  47. // You should have received a copy of the GNU General Public License along with
  48. // Libgc-base. If not, see <http://www.gnu.org/licenses/>.
  49. //==============================================================================
  50. #include <gc/mem.h>
  51.  
  52. #include <gc/u8b.h>
  53.  
  54.  
  55.  
  56. //==============================================================================
  57. // Initialization and deinitialization
  58. //==============================================================================
  59. u8 u8b_init(struct u8b_i *buf, struct u8b_c *conf)
  60. {
  61. buf->dbeg = mem_alloc(conf->size);
  62.  
  63. if (unlikely(buf->dbeg == NULL))
  64. return 1;
  65.  
  66. buf->cbeg = size;
  67. buf->ccur = 0;
  68. buf->dcur = buf->dbeg; // Read pointer
  69. return 0;
  70. }
  71.  
  72.  
  73. void u8b_deinit(struct u8b_i *buf)
  74. {
  75. mem_dealloc(buf->dbeg);
  76. }
  77.  
  78.  
  79.  
  80. //==============================================================================
  81. // Input and output
  82. //==============================================================================
  83. void u8b_oa(struct u8b_i *buf, u32 size)
  84. {
  85. u32 off = buf->dout - buf->dbeg + size;
  86.  
  87. if (off < buf->cbeg - 1)
  88. buf->dout += size;
  89.  
  90. else // Wrap around.
  91. buf->dout = buf->dbeg + off - buf->cbeg;
  92.  
  93. buf->cout -= size; // An atomic operation for this member will be needed in u8b_ia().
  94. buf->cin += size; // Need atomic operation since we are not in an input function.
  95. }
  96.  
  97.  
  98. u32 u8b_ogc(struct u8b_i *buf)
  99. {
  100. return buf->cout;
  101. }
  102.  
  103.  
  104. u32 u8b_ogcc(struct u8b_i *buf)
  105. {
  106. // Return contiguous bytes
  107. }
  108.  
  109.  
  110. void u8b_wra(struct u8b_i *buf, u32 size)
  111. {
  112. buf->cread += size;
  113. buf->cwrite -= size;
  114. buf->dwrite += size;
  115. }
  116.  
  117.  
  118. u32 u8b_wrgc(struct u8b_i *buf)
  119. {
  120. return buf->cwrite;
  121. }
  122.  
  123.  
  124.  
  125. //==============================================================================
  126. // Peeking
  127. //==============================================================================
  128. u8 u8b_peek1(struct u8b_i *buf)
  129. {
  130. return buf->dread[0];
  131. }
  132.  
  133.  
  134. u16 u8b_peek2(struct u8b_i *buf)
  135. {
  136. u8 cdata[2];
  137.  
  138. cdata[0] = buf->dread[0];
  139. cdata[1] = buf->dread[1];
  140.  
  141. return (u16)cdata;
  142. }
  143. dev/libgc-base/src/util/pars.c
  144. //==============================================================================
  145. // This file is part of Libgc-base.
  146. // Copyright (C) 2015 Anthony Gorecki <anthony@anthonygorecki.ca>
  147. //
  148. // Libgc-base is free software: you can redistribute it and/or modify it under
  149. // the terms of the GNU General Public License as published by the Free Software
  150. // Foundation, either version 3 of the License, or (at your option) any later
  151. // version.
  152. //
  153. // Libgc-base is distributed in the hope that it will be useful, but WITHOUT ANY
  154. // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  155. // A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  156. //
  157. // You should have received a copy of the GNU General Public License along with
  158. // Libgc-base. If not, see <http://www.gnu.org/licenses/>.
  159. //==============================================================================
  160. #include <gc/pars.h>
  161.  
  162.  
  163.  
  164. //==============================================================================
  165. // "u8's"
  166. //==============================================================================
  167. u8 pars_u8c(struct pars_i *pars, u8 data)
  168. {
  169. u32 orig_cnt = u8b_cnt(&pars->buf);
  170.  
  171. while (u8b_cnt(&pars->buf)) {
  172. if (u8b_peek1(&pars->buf) != data)
  173. break;
  174.  
  175. u8b_adv(&pars->buf, 1);
  176. }
  177.  
  178. return !(u8b_cnt(&pars->buf) < orig_cnt);
  179. }
  180.  
  181.  
  182. u8 pars_u8c2(struct pars_i *pars, u8 data1, u8 data2)
  183. {
  184. u8 cdata[] = {data1, data2};
  185. u32 orig_cnt = u8b_cnt(&pars->buf);
  186.  
  187. while (u8b_cnt(&pars->buf) >= 2) {
  188. if (u8b_peek2(&pars->buf) != (u16)cdata)
  189. break;
  190.  
  191. u8b_adv(&pars->buf, 2);
  192. }
  193.  
  194. return !(u8b_cnt(&pars->buf) < orig_cnt);
  195. }
  196.  
  197.  
  198.  
  199. //==============================================================================
  200. // New line characters
  201. //==============================================================================
  202. u8 pars_nld(struct pars_i *pars, u8 types)
  203. {
  204. assert((types & NL_RN) || (types & NL_N) || (types & NL_R));
  205.  
  206. u8 rn[] = {'\r', '\n'};
  207.  
  208. if (u8b_cnt(&pars->buf) >= 2 && (types & NL_RN)
  209. && u8b_peek2(&pars->buf) == (u16)rn)
  210. return NL_RN;
  211.  
  212. if (u8b_cnt(&pars->buf)) {
  213. if ((types & NL_N) && u8b_peek(&pars->buf) == '\n')
  214. return NL_N;
  215.  
  216. if ((types & NL_R) && u8b_peek(&pars->buf) == '\r')
  217. return NL_R;
  218. }
  219.  
  220. return 0;
  221. }
  222.  
  223.  
  224. u8 pars_nlcs(struct pars_i *pars, u8 types)
  225. {
  226. u8 dtype = pars_nld(pars, types);
  227.  
  228. if (unlikely(!dtype))
  229. return 1;
  230.  
  231. if ((dtype & NL_RN)) {
  232. u8b_adv(&pars->buf, 2);
  233. pars_u8c2(pars, '\r', '\n');
  234. }
  235.  
  236. else {
  237. u8b_adv(&pars->buf, 1);
  238.  
  239. if ((dtype & NL_N))
  240. pars_u8c(pars, '\n');
  241.  
  242. if ((dtype & NL_R))
  243. pars_u8c(pars, '\r');
  244. }
  245.  
  246. return 0;
  247. }
  248.  
  249.  
  250. u8 pars_nlcm(struct pars_i *pars, u8 types)
  251. {
  252. u8 ret = 1;
  253.  
  254. for (;;) {
  255. if (pars_nlcs(pars, types))
  256. break;
  257.  
  258. ret = 0;
  259. }
  260.  
  261. return ret;
  262. }
  263.  
  264. dev/libgc-base/src/os/unix/proc.c
  265. //==============================================================================
  266. // This file is part of Libgc-base.
  267. // Copyright (C) 2015 Anthony Gorecki <anthony@anthonygorecki.ca>
  268. //
  269. // Libgc-base is free software: you can redistribute it and/or modify it under
  270. // the terms of the GNU General Public License as published by the Free Software
  271. // Foundation, either version 3 of the License, or (at your option) any later
  272. // version.
  273. //
  274. // Libgc-base is distributed in the hope that it will be useful, but WITHOUT ANY
  275. // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  276. // A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  277. //
  278. // You should have received a copy of the GNU General Public License along with
  279. // Libgc-base. If not, see <http://www.gnu.org/licenses/>.
  280. //==============================================================================
  281. // proc_st_init, proc_st_next, ...
  282. #include <gc/proc.h>
  283.  
  284.  
  285.  
  286. //==============================================================================
  287. // Execution
  288. //==============================================================================
  289. u8 proc_exec(void)
  290. {
  291. }
  292. dev/libgc-base/src/os/unix/mem.c
  293. //==============================================================================
  294. // This file is part of Libgc-base.
  295. // Copyright (C) 2015 Anthony Gorecki <anthony@anthonygorecki.ca>
  296. //
  297. // Libgc-base is free software: you can redistribute it and/or modify it under
  298. // the terms of the GNU General Public License as published by the Free Software
  299. // Foundation, either version 3 of the License, or (at your option) any later
  300. // version.
  301. //
  302. // Libgc-base is distributed in the hope that it will be useful, but WITHOUT ANY
  303. // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  304. // A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  305. //
  306. // You should have received a copy of the GNU General Public License along with
  307. // Libgc-base. If not, see <http://www.gnu.org/licenses/>.
  308. //==============================================================================
  309. #include <gc/mem.h>
  310.  
  311. #include <stdlib.h>
  312. #include <string.h>
  313.  
  314.  
  315.  
  316. //==============================================================================
  317. // Allocation, reallocation and deallocation
  318. //==============================================================================
  319. void *mem_alloc(size_t size)
  320. {
  321. return malloc(size);
  322. }
  323.  
  324.  
  325. void *mem_realloc(void *ptr, size_t size)
  326. {
  327. return realloc(ptr, size);
  328. }
  329.  
  330.  
  331. void mem_dealloc(void *ptr)
  332. {
  333. free(ptr);
  334. }
  335.  
  336.  
  337.  
  338. //==============================================================================
  339. // Utility
  340. //==============================================================================
  341. s8 mem_comp(void *data1, void *data2, size_t size)
  342. {
  343. return memcmp(data1, data2, size);
  344. }
  345.  
  346.  
  347. void mem_copy(void *dest, void *src, size_t size)
  348. {
  349. memcpy(dest, src, size);
  350. }
  351.  
  352.  
  353. void mem_move(void *dest, void *src, size_t size)
  354. {
  355. memmove(dest, src, size);
  356. }
  357.  
  358.  
  359. void mem_set(void *ptr, u8 data, size_t size)
  360. {
  361. memset(ptr, data, size);
  362. }
  363. dev/libgc-base/src/os/unix/file.c
  364. //==============================================================================
  365. // This file is part of Libgc-base.
  366. // Copyright (C) 2015 Anthony Gorecki <anthony@anthonygorecki.ca>
  367. //
  368. // Libgc-base is free software: you can redistribute it and/or modify it under
  369. // the terms of the GNU General Public License as published by the Free Software
  370. // Foundation, either version 3 of the License, or (at your option) any later
  371. // version.
  372. //
  373. // Libgc-base is distributed in the hope that it will be useful, but WITHOUT ANY
  374. // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  375. // A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  376. //
  377. // You should have received a copy of the GNU General Public License along with
  378. // Libgc-base. If not, see <http://www.gnu.org/licenses/>.
  379. //==============================================================================
  380. #include <gc/file.h>
  381.  
  382. #include <unistd.h>
  383.  
  384.  
  385.  
  386. //==============================================================================
  387. // Initialization and deinitialization
  388. //==============================================================================
  389. u8 file_init(struct file_i *file, struct file_c *conf)
  390. {
  391. if (!(conf->flags & DIO_CREAT))
  392. file->fd = open(conf->path, conf->flags);
  393.  
  394. else
  395. file->fd = open(conf->path, conf->flags, conf->mode);
  396.  
  397. if (unlikely(file->fd == -1))
  398. return 1;
  399.  
  400. return 0;
  401. }
  402.  
  403.  
  404. void file_deinit(struct file_i *file)
  405. {
  406. close(file->fd);
  407. }
  408.  
  409.  
  410.  
  411. //==============================================================================
  412. // Read and write
  413. //==============================================================================
  414. u8 file_read(struct file_i *file, struct u8b_i *buf)
  415. {
  416. ssize_t size = read(file->fd, buf->dwrite, u8b_wrgcc(buf));
  417.  
  418. if (unlikely(size == -1))
  419. return 1;
  420.  
  421. u8b_wra(buf, size);
  422. return 0;
  423. }
  424.  
  425.  
  426. u8 file_write(struct file_i *file, struct u8b_i *buf)
  427. {
  428. ssize_t size = write(file->fd, buf->dread, u8b_rdgcc(buf));
  429.  
  430. if (unlikely(size == -1))
  431. return 1;
  432.  
  433. u8b_rda(buf, size);
  434. return 0;
  435. }
  436.  
  437.  
  438.  
  439. //==============================================================================
  440. // Utility
  441. //==============================================================================
  442. u8 file_gstats(struct file_i *file, struct file_stats *stats)
  443. {
  444. if (unlikely(fstat(file->fd, &stats->data)))
  445. return 1;
  446.  
  447. return 0;
  448. }
  449. dev/libgc-base/make.sh
  450. gcc -o libgc-base -shared -I include -std=c11 -Wall -Wextra -Wpedantic -Werror `find src -type f -name '*.c'`
  451. dev/libgc-base/include/gc/proc.h
  452. //==============================================================================
  453. // This file is part of Libgc-base.
  454. // Copyright (C) 2015 Anthony Gorecki <anthony@anthonygorecki.ca>
  455. //
  456. // Libgc-base is free software: you can redistribute it and/or modify it under
  457. // the terms of the GNU General Public License as published by the Free Software
  458. // Foundation, either version 3 of the License, or (at your option) any later
  459. // version.
  460. //
  461. // Libgc-base is distributed in the hope that it will be useful, but WITHOUT ANY
  462. // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  463. // A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  464. //
  465. // You should have received a copy of the GNU General Public License along with
  466. // Libgc-base. If not, see <http://www.gnu.org/licenses/>.
  467. //==============================================================================
  468. #pragma once
  469.  
  470. #include <gc/common.h>
  471.  
  472. #if defined(__use_gnu_bktrc)
  473. #include <gc/proc-gnu-bktrc.h>
  474. #endif
  475.  
  476. #if defined(__use_lunwind)
  477. #include <gc/proc-lunwind.h>
  478. #endif
  479.  
  480. // Null function pointers for systems where back traces are not supported.
  481. dev/libgc-base/include/gc/common.h
  482. //==============================================================================
  483. // This file is part of Libgc-base.
  484. // Copyright (C) 2015 Anthony Gorecki <anthony@anthonygorecki.ca>
  485. //
  486. // Libgc-base is free software: you can redistribute it and/or modify it under
  487. // the terms of the GNU General Public License as published by the Free Software
  488. // Foundation, either version 3 of the License, or (at your option) any later
  489. // version.
  490. //
  491. // Libgc-base is distributed in the hope that it will be useful, but WITHOUT ANY
  492. // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  493. // A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  494. //
  495. // You should have received a copy of the GNU General Public License along with
  496. // Libgc-base. If not, see <http://www.gnu.org/licenses/>.
  497. //==============================================================================
  498. #pragma once
  499.  
  500. #include <stddef.h>
  501. #include <stdint.h>
  502.  
  503. #define likely(EXPR) __builtin_expect(EXPR, 1)
  504. #define unlikely(EXPR) __builtin_expect(EXPR, 0)
  505.  
  506. typedef int8_t s8;
  507. typedef int16_t s16;
  508. typedef int32_t s32;
  509. typedef int64_t s64;
  510.  
  511. typedef uint8_t u8;
  512. typedef uint16_t u16;
  513. typedef uint32_t u32;
  514. typedef uint64_t u64;
  515. dev/libgc-base/include/gc/u8b.h
  516. //==============================================================================
  517. // This file is part of Libgc-base.
  518. // Copyright (C) 2015 Anthony Gorecki <anthony@anthonygorecki.ca>
  519. //
  520. // Libgc-base is free software: you can redistribute it and/or modify it under
  521. // the terms of the GNU General Public License as published by the Free Software
  522. // Foundation, either version 3 of the License, or (at your option) any later
  523. // version.
  524. //
  525. // Libgc-base is distributed in the hope that it will be useful, but WITHOUT ANY
  526. // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  527. // A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  528. //
  529. // You should have received a copy of the GNU General Public License along with
  530. // Libgc-base. If not, see <http://www.gnu.org/licenses/>.
  531. //==============================================================================
  532. #pragma once
  533.  
  534. #include <gc/common.h>
  535.  
  536. struct u8b_i {
  537. u32 cbeg;
  538. u32 cread;
  539. u32 cwrite;
  540. u8 *dbeg;
  541. u8 *dread;
  542. u8 *dwrite;
  543. };
  544. dev/libgc-base/include/gc/pars.h
  545. //==============================================================================
  546. // This file is part of Libgc-base.
  547. // Copyright (C) 2015 Anthony Gorecki <anthony@anthonygorecki.ca>
  548. //
  549. // Libgc-base is free software: you can redistribute it and/or modify it under
  550. // the terms of the GNU General Public License as published by the Free Software
  551. // Foundation, either version 3 of the License, or (at your option) any later
  552. // version.
  553. //
  554. // Libgc-base is distributed in the hope that it will be useful, but WITHOUT ANY
  555. // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  556. // A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  557. //
  558. // You should have received a copy of the GNU General Public License along with
  559. // Libgc-base. If not, see <http://www.gnu.org/licenses/>.
  560. //==============================================================================
  561. #pragma once
  562.  
  563. #include <gc/u8b.h>
  564.  
  565. struct pars_i {
  566. struct u8b_i buf;
  567. };
  568. dev/libgc-base/include/gc/file.h
  569. //==============================================================================
  570. // This file is part of Libgc-base.
  571. // Copyright (C) 2015 Anthony Gorecki <anthony@anthonygorecki.ca>
  572. //
  573. // Libgc-base is free software: you can redistribute it and/or modify it under
  574. // the terms of the GNU General Public License as published by the Free Software
  575. // Foundation, either version 3 of the License, or (at your option) any later
  576. // version.
  577. //
  578. // Libgc-base is distributed in the hope that it will be useful, but WITHOUT ANY
  579. // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  580. // A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  581. //
  582. // You should have received a copy of the GNU General Public License along with
  583. // Libgc-base. If not, see <http://www.gnu.org/licenses/>.
  584. //==============================================================================
  585. #pragma once
  586.  
  587. #include <gc/u8b.h>
  588.  
  589. #include <sys/stat.h>
  590. #include <fcntl.h>
  591.  
  592. struct file_i {
  593. int fd;
  594. };
  595.  
  596. struct file_c {
  597. const char *path;
  598. int flags;
  599. mode_t mode;
  600. };
  601.  
  602. struct file_stats {
  603. struct stat data;
  604. };
  605. dev/libgc-base/include/gc/mem.h
  606. //==============================================================================
  607. // This file is part of Libgc-base.
  608. // Copyright (C) 2015 Anthony Gorecki <anthony@anthonygorecki.ca>
  609. //
  610. // Libgc-base is free software: you can redistribute it and/or modify it under
  611. // the terms of the GNU General Public License as published by the Free Software
  612. // Foundation, either version 3 of the License, or (at your option) any later
  613. // version.
  614. //
  615. // Libgc-base is distributed in the hope that it will be useful, but WITHOUT ANY
  616. // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  617. // A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  618. //
  619. // You should have received a copy of the GNU General Public License along with
  620. // Libgc-base. If not, see <http://www.gnu.org/licenses/>.
  621. //==============================================================================
  622. #pragma once
  623.  
  624. #include <gc/common.h>
  625.  
  626. void* mem_alloc(size_t);
  627. void* mem_realloc(void*, size_t);
  628. void mem_dealloc(void*);
  629.  
  630. u8 mem_comp(void*, void*, size_t);
  631. void mem_copy(void*, void*, size_t);
  632. void mem_move(void*, void*, size_t);
  633. void mem_set(void*, u8, size_t);
  634. dev/doc/includes.txt
  635. External Gc headers, Gc header for local file, all other headers; groups
  636. separated by a single new line.
  637. dev/doc/code-style.txt
  638. Soft limit for line length is 80 characters, hard limit is 100 characters.
  639.  
  640. Conditional statements requiring multiple lines should indent the subsequent
  641. lines with two tabs (one additional tab, relative the the code following the
  642. conditional statement).
  643. dev/doc/func-naming.txt
  644. Hard limit for function name first part is five characters. Soft limit is
  645. four characters.
  646.  
  647. Function name hard limit for second part is five characters (initialization /
  648. activation). Does not apply to names that have been shortened to individual
  649. characters per word.
  650.  
  651. Struct member name soft limit is four characters.
  652. script/upload-pastebin.sh
  653. cd /root
  654. date > upload-data.txt
  655.  
  656. echo 'Files:'
  657.  
  658. files=$(find dev -name '*.c' -o -name '*.h' -o -name '*.py' -o -name '*.sh' -o -name '*.txt' -o -name '.vimrc')
  659.  
  660. for file in $files; do
  661. echo " $file"
  662. echo $file >> upload-data.txt
  663. cat $file >> upload-data.txt
  664. done
  665.  
  666. files=$(find script -name '*.c' -o -name '*.h' -o -name '*.py' -o -name '*.sh' -o -name '*.txt' -o -name '.vimrc')
  667.  
  668. for file in $files; do
  669. echo " $file"
  670. echo $file >> upload-data.txt
  671. cat $file >> upload-data.txt
  672. done
  673.  
  674. echo
  675. echo -n 'URL: '
  676. python ./script/intrn/upload-pastebin.py `cat script/intrn/dev-key`
  677. rm upload-data.txt
  678. script/intrn/upload-pastebin.py
  679. import pastebin_python
  680. import sys
  681.  
  682. pb = pastebin_python.pastebin.PastebinPython(api_dev_key=sys.argv[1])
  683. print pb.createPasteFromFile('upload-data.txt', 'anthony gorecki anthony@anthonygorecki.ca', '', '0', 'N')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement